From 27171dbe70556ee1b19cd15513a46219d15eb9c9 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 14 Feb 2023 07:32:38 +0000 Subject: [PATCH] CodeGen from PR 22595 in Azure/azure-rest-api-specs Merge ae13f2ee774ca076d87c0132e5629efda678e2cc into 6ffdee5a75188e52088ffa0f476fcef384e5ac1d --- ...ourceManager.AppPlatform.netstandard2.0.cs | 630 +++++++++++++++++- .../Generated/AppPlatformGatewayResource.cs | 93 ++- .../Generated/AppPlatformServiceResource.cs | 208 ++++++ .../ApplicationAcceleratorResource.cs | 403 +++++++++++ ...pplicationAcceleratorResourceCollection.cs | 340 ++++++++++ .../ApplicationAcceleratorResourceData.cs | 40 ++ .../Generated/ApplicationLiveViewResource.cs | 297 +++++++++ .../ApplicationLiveViewResourceCollection.cs | 340 ++++++++++ .../ApplicationLiveViewResourceData.cs | 36 + .../CustomizedAcceleratorResource.cs | 366 ++++++++++ ...CustomizedAcceleratorResourceCollection.cs | 340 ++++++++++ .../CustomizedAcceleratorResourceData.cs | 40 ++ .../src/Generated/DevToolPortalResource.cs | 297 +++++++++ .../DevToolPortalResourceCollection.cs | 340 ++++++++++ .../Generated/DevToolPortalResourceData.cs | 36 + .../Extensions/AppPlatformExtensions.cs | 95 +++ ...ationAcceleratorResourceOperationSource.cs | 40 ++ ...licationLiveViewResourceOperationSource.cs | 40 ++ ...mizedAcceleratorResourceOperationSource.cs | 40 ++ .../DevToolPortalResourceOperationSource.cs | 40 ++ .../AcceleratorAuthSetting.Serialization.cs | 37 + .../Models/AcceleratorAuthSetting.cs | 32 + ...celeratorBasicAuthSetting.Serialization.cs | 56 ++ .../Models/AcceleratorBasicAuthSetting.cs | 43 ++ .../AcceleratorGitRepository.Serialization.cs | 95 +++ .../Models/AcceleratorGitRepository.cs | 71 ++ .../AcceleratorPublicSetting.Serialization.cs | 37 + .../Models/AcceleratorPublicSetting.cs | 26 + .../AcceleratorSshSetting.Serialization.cs | 70 ++ .../Generated/Models/AcceleratorSshSetting.cs | 39 ++ .../src/Generated/Models/ApmType.cs | 60 ++ ...mPersistentDiskProperties.Serialization.cs | 5 + .../AppCustomPersistentDiskProperties.cs | 6 +- .../AppPlatformAppProperties.Serialization.cs | 49 +- .../Models/AppPlatformAppProperties.cs | 42 +- ...ppPlatformAzureFileVolume.Serialization.cs | 27 +- .../Models/AppPlatformAzureFileVolume.cs | 10 +- ...PlatformBindingProperties.Serialization.cs | 12 +- .../Models/AppPlatformBindingProperties.cs | 37 +- ...formBuildResultProperties.Serialization.cs | 18 +- .../AppPlatformBuildResultProperties.cs | 6 +- ...tformBuildStageProperties.Serialization.cs | 14 +- .../Models/AppPlatformBuildStageProperties.cs | 10 +- ...latformDeploymentSettings.Serialization.cs | 39 +- .../Models/AppPlatformDeploymentSettings.cs | 41 +- .../AppPlatformGatewayPatch.Serialization.cs | 26 + .../Models/AppPlatformGatewayPatch.cs | 21 + ...PlatformGatewayProperties.Serialization.cs | 44 +- .../Models/AppPlatformGatewayProperties.cs | 11 +- ...ewayRouteConfigProperties.Serialization.cs | 70 +- ...AppPlatformGatewayRouteConfigProperties.cs | 16 +- ...PlatformServiceProperties.Serialization.cs | 40 +- .../Models/AppPlatformServiceProperties.cs | 14 +- ...ationAcceleratorComponent.Serialization.cs | 57 ++ .../Models/ApplicationAcceleratorComponent.cs | 40 ++ ...cationAcceleratorInstance.Serialization.cs | 35 + .../Models/ApplicationAcceleratorInstance.cs | 32 + ...tionAcceleratorProperties.Serialization.cs | 57 ++ .../ApplicationAcceleratorProperties.cs | 36 + ...ApplicationAcceleratorProvisioningState.cs | 60 ++ ...leratorResourceCollection.Serialization.cs | 47 ++ ...pplicationAcceleratorResourceCollection.cs | 43 ++ ...onAcceleratorResourceData.Serialization.cs | 92 +++ ...celeratorResourceRequests.Serialization.cs | 46 ++ .../ApplicationAcceleratorResourceRequests.cs | 36 + ...licationLiveViewComponent.Serialization.cs | 63 ++ .../Models/ApplicationLiveViewComponent.cs | 70 ++ ...plicationLiveViewInstance.Serialization.cs | 35 + .../Models/ApplicationLiveViewInstance.cs | 32 + ...icationLiveViewProperties.Serialization.cs | 57 ++ .../Models/ApplicationLiveViewProperties.cs | 36 + .../ApplicationLiveViewProvisioningState.cs | 63 ++ ...iveViewResourceCollection.Serialization.cs | 47 ++ .../ApplicationLiveViewResourceCollection.cs | 43 ++ ...ationLiveViewResourceData.Serialization.cs | 76 +++ ...nLiveViewResourceRequests.Serialization.cs | 46 ++ .../ApplicationLiveViewResourceRequests.cs | 36 + .../Generated/Models/BuildpackBindingType.cs | 3 + .../Models/CustomScaleRule.Serialization.cs | 94 +++ .../src/Generated/Models/CustomScaleRule.cs | 47 ++ ...izedAcceleratorProperties.Serialization.cs | 114 ++++ .../Models/CustomizedAcceleratorProperties.cs | 58 ++ .../CustomizedAcceleratorProvisioningState.cs | 60 ++ ...leratorResourceCollection.Serialization.cs | 47 ++ ...CustomizedAcceleratorResourceCollection.cs | 37 + ...edAcceleratorResourceData.Serialization.cs | 92 +++ ...AcceleratorValidateResult.Serialization.cs | 40 ++ .../CustomizedAcceleratorValidateResult.cs | 32 + ...ustomizedAcceleratorValidateResultState.cs | 51 ++ ...evToolPortalFeatureDetail.Serialization.cs | 51 ++ .../Models/DevToolPortalFeatureDetail.cs | 32 + ...ToolPortalFeatureSettings.Serialization.cs | 61 ++ .../Models/DevToolPortalFeatureSettings.cs | 32 + .../Models/DevToolPortalFeatureState.cs | 51 ++ .../DevToolPortalInstance.Serialization.cs | 35 + .../Generated/Models/DevToolPortalInstance.cs | 32 + .../DevToolPortalProperties.Serialization.cs | 128 ++++ .../Models/DevToolPortalProperties.cs | 57 ++ .../Models/DevToolPortalProvisioningState.cs | 63 ++ ...lPortalResourceCollection.Serialization.cs | 47 ++ .../Models/DevToolPortalResourceCollection.cs | 43 ++ ...DevToolPortalResourceData.Serialization.cs | 76 +++ ...oolPortalResourceRequests.Serialization.cs | 46 ++ .../Models/DevToolPortalResourceRequests.cs | 36 + ...evToolPortalSsoProperties.Serialization.cs | 95 +++ .../Models/DevToolPortalSsoProperties.cs | 45 ++ ...rtiesEnvironmentVariables.Serialization.cs | 84 +++ .../GatewayPropertiesEnvironmentVariables.cs | 37 + .../Models/HttpScaleRule.Serialization.cs | 83 +++ .../src/Generated/Models/HttpScaleRule.cs | 37 + .../MarketplaceResource.Serialization.cs | 62 ++ .../Generated/Models/MarketplaceResource.cs | 36 + ...inedAcceleratorProperties.Serialization.cs | 97 +++ .../Models/PredefinedAcceleratorProperties.cs | 53 ++ .../PredefinedAcceleratorProvisioningState.cs | 57 ++ ...leratorResourceCollection.Serialization.cs | 47 ++ ...PredefinedAcceleratorResourceCollection.cs | 37 + ...edAcceleratorResourceData.Serialization.cs | 92 +++ .../Models/PredefinedAcceleratorState.cs | 51 ++ .../Models/QueueScaleRule.Serialization.cs | 83 +++ .../src/Generated/Models/QueueScaleRule.cs | 40 ++ .../Generated/Models/Scale.Serialization.cs | 88 +++ .../src/Generated/Models/Scale.cs | 40 ++ .../Models/ScaleRule.Serialization.cs | 104 +++ .../src/Generated/Models/ScaleRule.cs | 44 ++ .../Models/ScaleRuleAuth.Serialization.cs | 51 ++ .../src/Generated/Models/ScaleRuleAuth.cs | 32 + .../Generated/Models/Secret.Serialization.cs | 51 ++ .../src/Generated/Models/Secret.cs | 32 + .../Models/TcpScaleRule.Serialization.cs | 83 +++ .../src/Generated/Models/TcpScaleRule.cs | 37 + ...ownAcceleratorAuthSetting.Serialization.cs | 37 + .../Models/UnknownAcceleratorAuthSetting.cs | 20 + ...mPersistentDiskProperties.Serialization.cs | 18 +- .../UnknownCustomPersistentDiskProperties.cs | 3 +- .../PredefinedAcceleratorResource.cs | 289 ++++++++ ...PredefinedAcceleratorResourceCollection.cs | 258 +++++++ .../PredefinedAcceleratorResourceData.cs | 40 ++ .../ApiPortalCustomDomainsRestOperations.cs | 2 +- .../ApiPortalsRestOperations.cs | 2 +- .../ApplicationAcceleratorsRestOperations.cs | 445 +++++++++++++ .../ApplicationLiveViewsRestOperations.cs | 445 +++++++++++++ .../RestOperations/AppsRestOperations.cs | 2 +- .../RestOperations/BindingsRestOperations.cs | 2 +- .../BuildServiceAgentPoolRestOperations.cs | 2 +- .../BuildServiceBuilderRestOperations.cs | 2 +- .../BuildServiceRestOperations.cs | 2 +- .../BuildpackBindingRestOperations.cs | 157 ++++- .../CertificatesRestOperations.cs | 2 +- .../ConfigServersRestOperations.cs | 2 +- .../ConfigurationServicesRestOperations.cs | 2 +- .../CustomDomainsRestOperations.cs | 2 +- .../CustomizedAcceleratorsRestOperations.cs | 576 ++++++++++++++++ .../DeploymentsRestOperations.cs | 2 +- .../DevToolPortalsRestOperations.cs | 445 +++++++++++++ .../GatewayCustomDomainsRestOperations.cs | 2 +- .../GatewayRouteConfigsRestOperations.cs | 2 +- .../RestOperations/GatewaysRestOperations.cs | 182 ++++- .../MonitoringSettingsRestOperations.cs | 2 +- .../PredefinedAcceleratorsRestOperations.cs | 465 +++++++++++++ .../RuntimeVersionsRestOperations.cs | 2 +- .../ServiceRegistriesRestOperations.cs | 2 +- .../RestOperations/ServicesRestOperations.cs | 2 +- .../RestOperations/SkusRestOperations.cs | 2 +- .../RestOperations/StoragesRestOperations.cs | 2 +- .../src/autorest.md | 2 +- 166 files changed, 12704 insertions(+), 151 deletions(-) create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApplicationAcceleratorResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApplicationAcceleratorResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApplicationAcceleratorResourceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApplicationLiveViewResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApplicationLiveViewResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApplicationLiveViewResourceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomizedAcceleratorResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomizedAcceleratorResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomizedAcceleratorResourceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DevToolPortalResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DevToolPortalResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DevToolPortalResourceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ApplicationAcceleratorResourceOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ApplicationLiveViewResourceOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/CustomizedAcceleratorResourceOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/DevToolPortalResourceOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorAuthSetting.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorAuthSetting.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorBasicAuthSetting.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorBasicAuthSetting.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorGitRepository.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorGitRepository.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorPublicSetting.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorPublicSetting.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorSshSetting.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorSshSetting.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApmType.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformGatewayPatch.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformGatewayPatch.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorComponent.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorComponent.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorInstance.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorInstance.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorProvisioningState.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorResourceCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorResourceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorResourceRequests.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorResourceRequests.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewComponent.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewComponent.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewInstance.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewInstance.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewProvisioningState.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewResourceCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewResourceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewResourceRequests.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewResourceRequests.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomScaleRule.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomScaleRule.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorProvisioningState.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorResourceCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorResourceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorValidateResult.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorValidateResult.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorValidateResultState.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalFeatureDetail.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalFeatureDetail.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalFeatureSettings.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalFeatureSettings.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalFeatureState.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalInstance.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalInstance.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalProvisioningState.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalResourceCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalResourceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalResourceRequests.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalResourceRequests.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalSsoProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalSsoProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayPropertiesEnvironmentVariables.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayPropertiesEnvironmentVariables.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/HttpScaleRule.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/HttpScaleRule.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MarketplaceResource.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MarketplaceResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorProvisioningState.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorResourceCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorResourceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorState.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/QueueScaleRule.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/QueueScaleRule.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Scale.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Scale.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ScaleRule.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ScaleRule.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ScaleRuleAuth.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ScaleRuleAuth.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Secret.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Secret.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TcpScaleRule.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TcpScaleRule.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UnknownAcceleratorAuthSetting.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UnknownAcceleratorAuthSetting.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/PredefinedAcceleratorResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/PredefinedAcceleratorResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/PredefinedAcceleratorResourceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApplicationAcceleratorsRestOperations.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApplicationLiveViewsRestOperations.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/CustomizedAcceleratorsRestOperations.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/DevToolPortalsRestOperations.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/PredefinedAcceleratorsRestOperations.cs diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/api/Azure.ResourceManager.AppPlatform.netstandard2.0.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/api/Azure.ResourceManager.AppPlatform.netstandard2.0.cs index 3c03e8cf7a13..f9d48c964456 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/api/Azure.ResourceManager.AppPlatform.netstandard2.0.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/api/Azure.ResourceManager.AppPlatform.netstandard2.0.cs @@ -1,5 +1,80 @@ namespace Azure.ResourceManager.AppPlatform { + public partial class ApplicationAcceleratorResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ApplicationAcceleratorResource() { } + public virtual Azure.ResourceManager.AppPlatform.ApplicationAcceleratorResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetCustomizedAcceleratorResource(string customizedAcceleratorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetCustomizedAcceleratorResourceAsync(string customizedAcceleratorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.CustomizedAcceleratorResourceCollection GetCustomizedAcceleratorResources() { throw null; } + public virtual Azure.Response GetPredefinedAcceleratorResource(string predefinedAcceleratorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPredefinedAcceleratorResourceAsync(string predefinedAcceleratorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.PredefinedAcceleratorResourceCollection GetPredefinedAcceleratorResources() { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.ApplicationAcceleratorResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.ApplicationAcceleratorResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ApplicationAcceleratorResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ApplicationAcceleratorResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string applicationAcceleratorName, Azure.ResourceManager.AppPlatform.ApplicationAcceleratorResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string applicationAcceleratorName, Azure.ResourceManager.AppPlatform.ApplicationAcceleratorResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string applicationAcceleratorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string applicationAcceleratorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string applicationAcceleratorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string applicationAcceleratorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ApplicationAcceleratorResourceData : Azure.ResourceManager.Models.ResourceData + { + public ApplicationAcceleratorResourceData() { } + public Azure.ResourceManager.AppPlatform.Models.ApplicationAcceleratorProperties Properties { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.AppPlatformSku Sku { get { throw null; } set { } } + } + public partial class ApplicationLiveViewResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ApplicationLiveViewResource() { } + public virtual Azure.ResourceManager.AppPlatform.ApplicationLiveViewResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string applicationLiveViewName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.ApplicationLiveViewResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.ApplicationLiveViewResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ApplicationLiveViewResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ApplicationLiveViewResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string applicationLiveViewName, Azure.ResourceManager.AppPlatform.ApplicationLiveViewResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string applicationLiveViewName, Azure.ResourceManager.AppPlatform.ApplicationLiveViewResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string applicationLiveViewName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string applicationLiveViewName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string applicationLiveViewName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string applicationLiveViewName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ApplicationLiveViewResourceData : Azure.ResourceManager.Models.ResourceData + { + public ApplicationLiveViewResourceData() { } + public Azure.ResourceManager.AppPlatform.Models.ApplicationLiveViewProperties Properties { get { throw null; } set { } } + } public partial class AppPlatformApiPortalCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected AppPlatformApiPortalCollection() { } @@ -556,6 +631,8 @@ public static partial class AppPlatformExtensions { public static Azure.Response CheckAppPlatformNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.AppPlatform.Models.AppPlatformNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> CheckAppPlatformNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.AppPlatform.Models.AppPlatformNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.AppPlatform.ApplicationAcceleratorResource GetApplicationAcceleratorResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.ApplicationLiveViewResource GetApplicationLiveViewResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.AppPlatformApiPortalCustomDomainResource GetAppPlatformApiPortalCustomDomainResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.AppPlatformApiPortalResource GetAppPlatformApiPortalResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.AppPlatformAppResource GetAppPlatformAppResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -585,6 +662,9 @@ public static partial class AppPlatformExtensions public static Azure.ResourceManager.AppPlatform.AppPlatformStorageResource GetAppPlatformStorageResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.AppPlatformSupportedBuildpackResource GetAppPlatformSupportedBuildpackResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.AppPlatformSupportedStackResource GetAppPlatformSupportedStackResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.CustomizedAcceleratorResource GetCustomizedAcceleratorResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.DevToolPortalResource GetDevToolPortalResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.PredefinedAcceleratorResource GetPredefinedAcceleratorResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Pageable GetRuntimeVersions(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetRuntimeVersionsAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Pageable GetSkus(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -662,8 +742,10 @@ protected AppPlatformGatewayResource() { } public virtual System.Threading.Tasks.Task> GetAppPlatformGatewayRouteConfigAsync(string routeConfigName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppPlatform.AppPlatformGatewayRouteConfigCollection GetAppPlatformGatewayRouteConfigs() { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.AppPlatformGatewayData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.AppPlatformGatewayData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response> GetEnvSecrets(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task>> GetEnvSecretsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.AppPlatformGatewayPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.AppPlatformGatewayPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response ValidateDomain(Azure.ResourceManager.AppPlatform.Models.AppPlatformCustomDomainValidateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ValidateDomainAsync(Azure.ResourceManager.AppPlatform.Models.AppPlatformCustomDomainValidateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -791,6 +873,12 @@ protected AppPlatformServiceResource() { } public virtual Azure.Response EnableTestEndpoint(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> EnableTestEndpointAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetApplicationAcceleratorResource(string applicationAcceleratorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetApplicationAcceleratorResourceAsync(string applicationAcceleratorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.ApplicationAcceleratorResourceCollection GetApplicationAcceleratorResources() { throw null; } + public virtual Azure.Response GetApplicationLiveViewResource(string applicationLiveViewName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetApplicationLiveViewResourceAsync(string applicationLiveViewName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.ApplicationLiveViewResourceCollection GetApplicationLiveViewResources() { throw null; } public virtual Azure.Response GetAppPlatformApiPortal(string apiPortalName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAppPlatformApiPortalAsync(string apiPortalName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppPlatform.AppPlatformApiPortalCollection GetAppPlatformApiPortals() { throw null; } @@ -820,6 +908,11 @@ protected AppPlatformServiceResource() { } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetDeployments(System.Collections.Generic.IEnumerable version = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetDeploymentsAsync(System.Collections.Generic.IEnumerable version = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDevToolPortalResource(string devToolPortalName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDevToolPortalResourceAsync(string devToolPortalName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.DevToolPortalResourceCollection GetDevToolPortalResources() { throw null; } + public virtual Azure.Pageable GetForClusterBuildpackBindings(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetForClusterBuildpackBindingsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetTestKeys(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetTestKeysAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RegenerateTestKey(Azure.ResourceManager.AppPlatform.Models.RegenerateAppPlatformServiceTestKeyContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -927,15 +1020,171 @@ protected AppPlatformSupportedStackResource() { } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class CustomizedAcceleratorResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected CustomizedAcceleratorResource() { } + public virtual Azure.ResourceManager.AppPlatform.CustomizedAcceleratorResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, string customizedAcceleratorName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.CustomizedAcceleratorResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.CustomizedAcceleratorResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Validate(Azure.ResourceManager.AppPlatform.Models.CustomizedAcceleratorProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ValidateAsync(Azure.ResourceManager.AppPlatform.Models.CustomizedAcceleratorProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class CustomizedAcceleratorResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected CustomizedAcceleratorResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string customizedAcceleratorName, Azure.ResourceManager.AppPlatform.CustomizedAcceleratorResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string customizedAcceleratorName, Azure.ResourceManager.AppPlatform.CustomizedAcceleratorResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string customizedAcceleratorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string customizedAcceleratorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string customizedAcceleratorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string customizedAcceleratorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class CustomizedAcceleratorResourceData : Azure.ResourceManager.Models.ResourceData + { + public CustomizedAcceleratorResourceData() { } + public Azure.ResourceManager.AppPlatform.Models.CustomizedAcceleratorProperties Properties { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.AppPlatformSku Sku { get { throw null; } set { } } + } + public partial class DevToolPortalResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DevToolPortalResource() { } + public virtual Azure.ResourceManager.AppPlatform.DevToolPortalResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string devToolPortalName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.DevToolPortalResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.DevToolPortalResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DevToolPortalResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DevToolPortalResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string devToolPortalName, Azure.ResourceManager.AppPlatform.DevToolPortalResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string devToolPortalName, Azure.ResourceManager.AppPlatform.DevToolPortalResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string devToolPortalName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string devToolPortalName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string devToolPortalName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string devToolPortalName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DevToolPortalResourceData : Azure.ResourceManager.Models.ResourceData + { + public DevToolPortalResourceData() { } + public Azure.ResourceManager.AppPlatform.Models.DevToolPortalProperties Properties { get { throw null; } set { } } + } + public partial class PredefinedAcceleratorResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected PredefinedAcceleratorResource() { } + public virtual Azure.ResourceManager.AppPlatform.PredefinedAcceleratorResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, string predefinedAcceleratorName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Disable(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DisableAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Enable(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task EnableAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class PredefinedAcceleratorResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected PredefinedAcceleratorResourceCollection() { } + public virtual Azure.Response Exists(string predefinedAcceleratorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string predefinedAcceleratorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string predefinedAcceleratorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string predefinedAcceleratorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class PredefinedAcceleratorResourceData : Azure.ResourceManager.Models.ResourceData + { + public PredefinedAcceleratorResourceData() { } + public Azure.ResourceManager.AppPlatform.Models.PredefinedAcceleratorProperties Properties { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.AppPlatformSku Sku { get { throw null; } set { } } + } } namespace Azure.ResourceManager.AppPlatform.Models { + public abstract partial class AcceleratorAuthSetting + { + protected AcceleratorAuthSetting() { } + } + public partial class AcceleratorBasicAuthSetting : Azure.ResourceManager.AppPlatform.Models.AcceleratorAuthSetting + { + public AcceleratorBasicAuthSetting(string username) { } + public string Password { get { throw null; } set { } } + public string Username { get { throw null; } set { } } + } + public partial class AcceleratorGitRepository + { + public AcceleratorGitRepository(System.Uri uri, Azure.ResourceManager.AppPlatform.Models.AcceleratorAuthSetting authSetting) { } + public Azure.ResourceManager.AppPlatform.Models.AcceleratorAuthSetting AuthSetting { get { throw null; } set { } } + public string Branch { get { throw null; } set { } } + public string Commit { get { throw null; } set { } } + public string GitTag { get { throw null; } set { } } + public int? IntervalInSeconds { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } set { } } + } + public partial class AcceleratorPublicSetting : Azure.ResourceManager.AppPlatform.Models.AcceleratorAuthSetting + { + public AcceleratorPublicSetting() { } + } + public partial class AcceleratorSshSetting : Azure.ResourceManager.AppPlatform.Models.AcceleratorAuthSetting + { + public AcceleratorSshSetting() { } + public string HostKey { get { throw null; } set { } } + public string HostKeyAlgorithm { get { throw null; } set { } } + public string PrivateKey { get { throw null; } set { } } + } public partial class ActiveAppPlatformDeploymentsContent { public ActiveAppPlatformDeploymentsContent() { } public System.Collections.Generic.IList ActiveDeploymentNames { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ApmType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ApmType(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.ApmType AppDynamics { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ApmType ApplicationInsights { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ApmType Dynatrace { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ApmType ElasticApm { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ApmType NewRelic { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.ApmType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppPlatform.Models.ApmType left, Azure.ResourceManager.AppPlatform.Models.ApmType right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.ApmType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.ApmType left, Azure.ResourceManager.AppPlatform.Models.ApmType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AppBackendProtocol : System.IEquatable { private readonly object _dummy; @@ -962,6 +1211,7 @@ public AppCustomPersistentDisk(string storageId) { } public abstract partial class AppCustomPersistentDiskProperties { protected AppCustomPersistentDiskProperties(string mountPath) { } + public bool? EnableSubPath { get { throw null; } set { } } public bool? IsReadOnly { get { throw null; } set { } } public System.Collections.Generic.IList MountOptions { get { throw null; } } public string MountPath { get { throw null; } set { } } @@ -1024,6 +1274,53 @@ public partial class AppInstanceTcpSocketAction : Azure.ResourceManager.AppPlatf { public AppInstanceTcpSocketAction() { } } + public partial class ApplicationAcceleratorComponent + { + internal ApplicationAcceleratorComponent() { } + public System.Collections.Generic.IReadOnlyList Instances { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.ApplicationAcceleratorResourceRequests ResourceRequests { get { throw null; } } + } + public partial class ApplicationAcceleratorInstance + { + internal ApplicationAcceleratorInstance() { } + public string Name { get { throw null; } } + public string Status { get { throw null; } } + } + public partial class ApplicationAcceleratorProperties + { + public ApplicationAcceleratorProperties() { } + public System.Collections.Generic.IReadOnlyList Components { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.ApplicationAcceleratorProvisioningState? ProvisioningState { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ApplicationAcceleratorProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ApplicationAcceleratorProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.ApplicationAcceleratorProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ApplicationAcceleratorProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ApplicationAcceleratorProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ApplicationAcceleratorProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ApplicationAcceleratorProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.ApplicationAcceleratorProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppPlatform.Models.ApplicationAcceleratorProvisioningState left, Azure.ResourceManager.AppPlatform.Models.ApplicationAcceleratorProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.ApplicationAcceleratorProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.ApplicationAcceleratorProvisioningState left, Azure.ResourceManager.AppPlatform.Models.ApplicationAcceleratorProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ApplicationAcceleratorResourceRequests + { + internal ApplicationAcceleratorResourceRequests() { } + public string Cpu { get { throw null; } } + public int? InstanceCount { get { throw null; } } + public string Memory { get { throw null; } } + } public partial class ApplicationDiagnosticContent { public ApplicationDiagnosticContent() { } @@ -1031,6 +1328,54 @@ public ApplicationDiagnosticContent() { } public string DurationValue { get { throw null; } set { } } public string FilePath { get { throw null; } set { } } } + public partial class ApplicationLiveViewComponent + { + internal ApplicationLiveViewComponent() { } + public System.Collections.Generic.IReadOnlyList Instances { get { throw null; } } + public System.BinaryData Name { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.ApplicationLiveViewResourceRequests ResourceRequests { get { throw null; } } + } + public partial class ApplicationLiveViewInstance + { + internal ApplicationLiveViewInstance() { } + public string Name { get { throw null; } } + public string Status { get { throw null; } } + } + public partial class ApplicationLiveViewProperties + { + public ApplicationLiveViewProperties() { } + public System.Collections.Generic.IReadOnlyList Components { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.ApplicationLiveViewProvisioningState? ProvisioningState { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ApplicationLiveViewProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ApplicationLiveViewProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.ApplicationLiveViewProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ApplicationLiveViewProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ApplicationLiveViewProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ApplicationLiveViewProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ApplicationLiveViewProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ApplicationLiveViewProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.ApplicationLiveViewProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppPlatform.Models.ApplicationLiveViewProvisioningState left, Azure.ResourceManager.AppPlatform.Models.ApplicationLiveViewProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.ApplicationLiveViewProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.ApplicationLiveViewProvisioningState left, Azure.ResourceManager.AppPlatform.Models.ApplicationLiveViewProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ApplicationLiveViewResourceRequests + { + internal ApplicationLiveViewResourceRequests() { } + public string Cpu { get { throw null; } } + public int? InstanceCount { get { throw null; } } + public string Memory { get { throw null; } } + } public partial class ApplicationRemoteDebuggingConfig { internal ApplicationRemoteDebuggingConfig() { } @@ -1104,7 +1449,7 @@ internal AppPlatformApiPortalResourceRequirements() { } public partial class AppPlatformAppProperties { public AppPlatformAppProperties() { } - public System.Collections.Generic.IDictionary> AddonConfigs { get { throw null; } } + public System.Collections.Generic.IDictionary AddonConfigs { get { throw null; } } public System.Collections.Generic.IList CustomPersistentDisks { get { throw null; } } public string Fqdn { get { throw null; } } public Azure.ResourceManager.AppPlatform.Models.AppIngressSettings IngressSettings { get { throw null; } set { } } @@ -1114,6 +1459,7 @@ public AppPlatformAppProperties() { } public System.Collections.Generic.IList LoadedCertificates { get { throw null; } } public Azure.ResourceManager.AppPlatform.Models.AppPersistentDisk PersistentDisk { get { throw null; } set { } } public Azure.ResourceManager.AppPlatform.Models.AppPlatformAppProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IList Secrets { get { throw null; } } public Azure.ResourceManager.AppPlatform.Models.AppTemporaryDisk TemporaryDisk { get { throw null; } set { } } public System.Uri Uri { get { throw null; } } public Azure.ResourceManager.AppPlatform.Models.AppVnetAddons VnetAddons { get { throw null; } set { } } @@ -1141,13 +1487,13 @@ public AppPlatformAppProperties() { } } public partial class AppPlatformAzureFileVolume : Azure.ResourceManager.AppPlatform.Models.AppCustomPersistentDiskProperties { - public AppPlatformAzureFileVolume(string mountPath, string shareName) : base (default(string)) { } + public AppPlatformAzureFileVolume(string mountPath) : base (default(string)) { } public string ShareName { get { throw null; } set { } } } public partial class AppPlatformBindingProperties { public AppPlatformBindingProperties() { } - public System.Collections.Generic.IDictionary BindingParameters { get { throw null; } } + public System.Collections.Generic.IDictionary BindingParameters { get { throw null; } } public System.DateTimeOffset? CreatedOn { get { throw null; } } public string GeneratedProperties { get { throw null; } } public string Key { get { throw null; } set { } } @@ -1239,6 +1585,7 @@ public partial class AppPlatformBuildResultProperties public AppPlatformBuildResultProperties() { } public string BuildPodName { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList BuildStages { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.AppPlatformErrorInfo Error { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.ResourceManager.AppPlatform.Models.AppPlatformBuildResultProvisioningState? ProvisioningState { get { throw null; } } } @@ -1311,7 +1658,9 @@ public AppPlatformBuildServiceResourceRequirements() { } public partial class AppPlatformBuildStageProperties { internal AppPlatformBuildStageProperties() { } + public string ExitCode { get { throw null; } } public string Name { get { throw null; } } + public string Reason { get { throw null; } } public Azure.ResourceManager.AppPlatform.Models.KPackBuildStageProvisioningState? Status { get { throw null; } } } public abstract partial class AppPlatformCertificateProperties @@ -1583,12 +1932,13 @@ public AppPlatformDeploymentResourceRequirements() { } public partial class AppPlatformDeploymentSettings { public AppPlatformDeploymentSettings() { } - public System.Collections.Generic.IDictionary> AddonConfigs { get { throw null; } } + public System.Collections.Generic.IDictionary AddonConfigs { get { throw null; } } public System.Collections.Generic.IDictionary EnvironmentVariables { get { throw null; } } public bool? IsProbeDisabled { get { throw null; } set { } } public Azure.ResourceManager.AppPlatform.Models.AppInstanceProbe LivenessProbe { get { throw null; } set { } } public Azure.ResourceManager.AppPlatform.Models.AppInstanceProbe ReadinessProbe { get { throw null; } set { } } public Azure.ResourceManager.AppPlatform.Models.AppPlatformDeploymentResourceRequirements ResourceRequests { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.Scale Scale { get { throw null; } set { } } public Azure.ResourceManager.AppPlatform.Models.AppInstanceProbe StartupProbe { get { throw null; } set { } } public int? TerminationGracePeriodInSeconds { get { throw null; } set { } } } @@ -1667,11 +2017,18 @@ internal AppPlatformGatewayOperatorResourceRequirements() { } public int? InstanceCount { get { throw null; } } public string Memory { get { throw null; } } } + public partial class AppPlatformGatewayPatch + { + public AppPlatformGatewayPatch() { } + public Azure.ResourceManager.AppPlatform.Models.AppPlatformSku Sku { get { throw null; } set { } } + } public partial class AppPlatformGatewayProperties { public AppPlatformGatewayProperties() { } public Azure.ResourceManager.AppPlatform.Models.AppPlatformGatewayApiMetadataProperties ApiMetadataProperties { get { throw null; } set { } } + public System.Collections.Generic.IList ApmTypes { get { throw null; } } public Azure.ResourceManager.AppPlatform.Models.AppPlatformGatewayCorsProperties CorsProperties { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.GatewayPropertiesEnvironmentVariables EnvironmentVariables { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Instances { get { throw null; } } public bool? IsHttpsOnly { get { throw null; } set { } } public bool? IsPublic { get { throw null; } set { } } @@ -1712,10 +2069,13 @@ public partial class AppPlatformGatewayRouteConfigProperties { public AppPlatformGatewayRouteConfigProperties() { } public Azure.Core.ResourceIdentifier AppResourceId { get { throw null; } set { } } + public System.Collections.Generic.IList Filters { get { throw null; } } public System.Uri OpenApiUri { get { throw null; } set { } } + public System.Collections.Generic.IList Predicates { get { throw null; } } public Azure.ResourceManager.AppPlatform.Models.AppPlatformGatewayRouteConfigProtocol? Protocol { get { throw null; } set { } } public Azure.ResourceManager.AppPlatform.Models.AppPlatformGatewayProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Routes { get { throw null; } } + public bool? SsoEnabled { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AppPlatformGatewayRouteConfigProtocol : System.IEquatable @@ -1838,8 +2198,11 @@ public partial class AppPlatformServiceProperties { public AppPlatformServiceProperties() { } public string Fqdn { get { throw null; } } + public string InfraResourceGroup { get { throw null; } set { } } public bool? IsLogStreamPublicEndpoint { get { throw null; } set { } } public bool? IsZoneRedundant { get { throw null; } set { } } + public string ManagedEnvironmentId { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.MarketplaceResource MarketplaceResource { get { throw null; } set { } } public Azure.ResourceManager.AppPlatform.Models.AppPlatformServiceNetworkProfile NetworkProfile { get { throw null; } set { } } public Azure.ResourceManager.AppPlatform.Models.AppPlatformServicePowerState? PowerState { get { throw null; } } public Azure.ResourceManager.AppPlatform.Models.AppPlatformServiceProvisioningState? ProvisioningState { get { throw null; } } @@ -2227,6 +2590,7 @@ public BuildpackBindingLaunchProperties() { } public static Azure.ResourceManager.AppPlatform.Models.BuildpackBindingType ApacheSkyWalking { get { throw null; } } public static Azure.ResourceManager.AppPlatform.Models.BuildpackBindingType AppDynamics { get { throw null; } } public static Azure.ResourceManager.AppPlatform.Models.BuildpackBindingType ApplicationInsights { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BuildpackBindingType CACertificates { get { throw null; } } public static Azure.ResourceManager.AppPlatform.Models.BuildpackBindingType Dynatrace { get { throw null; } } public static Azure.ResourceManager.AppPlatform.Models.BuildpackBindingType ElasticApm { get { throw null; } } public static Azure.ResourceManager.AppPlatform.Models.BuildpackBindingType NewRelic { get { throw null; } } @@ -2286,6 +2650,164 @@ internal ConfigServerSettingsValidateResult() { } public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } public bool? IsValid { get { throw null; } } } + public partial class CustomizedAcceleratorProperties + { + public CustomizedAcceleratorProperties(Azure.ResourceManager.AppPlatform.Models.AcceleratorGitRepository gitRepository) { } + public System.Collections.Generic.IList AcceleratorTags { get { throw null; } } + public string Description { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.AcceleratorGitRepository GitRepository { get { throw null; } set { } } + public System.Uri IconUri { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.CustomizedAcceleratorProvisioningState? ProvisioningState { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CustomizedAcceleratorProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CustomizedAcceleratorProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.CustomizedAcceleratorProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.CustomizedAcceleratorProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.CustomizedAcceleratorProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.CustomizedAcceleratorProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.CustomizedAcceleratorProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.CustomizedAcceleratorProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppPlatform.Models.CustomizedAcceleratorProvisioningState left, Azure.ResourceManager.AppPlatform.Models.CustomizedAcceleratorProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.CustomizedAcceleratorProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.CustomizedAcceleratorProvisioningState left, Azure.ResourceManager.AppPlatform.Models.CustomizedAcceleratorProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CustomizedAcceleratorValidateResult + { + internal CustomizedAcceleratorValidateResult() { } + public string ErrorMessage { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.CustomizedAcceleratorValidateResultState? State { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CustomizedAcceleratorValidateResultState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CustomizedAcceleratorValidateResultState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.CustomizedAcceleratorValidateResultState Invalid { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.CustomizedAcceleratorValidateResultState Valid { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.CustomizedAcceleratorValidateResultState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppPlatform.Models.CustomizedAcceleratorValidateResultState left, Azure.ResourceManager.AppPlatform.Models.CustomizedAcceleratorValidateResultState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.CustomizedAcceleratorValidateResultState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.CustomizedAcceleratorValidateResultState left, Azure.ResourceManager.AppPlatform.Models.CustomizedAcceleratorValidateResultState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CustomScaleRule + { + public CustomScaleRule() { } + public System.Collections.Generic.IList Auth { get { throw null; } } + public string CustomScaleRuleType { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Metadata { get { throw null; } } + } + public partial class DevToolPortalFeatureDetail + { + public DevToolPortalFeatureDetail() { } + public string Route { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.DevToolPortalFeatureState? State { get { throw null; } set { } } + } + public partial class DevToolPortalFeatureSettings + { + public DevToolPortalFeatureSettings() { } + public Azure.ResourceManager.AppPlatform.Models.DevToolPortalFeatureDetail ApplicationAccelerator { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.DevToolPortalFeatureDetail ApplicationLiveView { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DevToolPortalFeatureState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DevToolPortalFeatureState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.DevToolPortalFeatureState Disabled { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.DevToolPortalFeatureState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.DevToolPortalFeatureState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppPlatform.Models.DevToolPortalFeatureState left, Azure.ResourceManager.AppPlatform.Models.DevToolPortalFeatureState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.DevToolPortalFeatureState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.DevToolPortalFeatureState left, Azure.ResourceManager.AppPlatform.Models.DevToolPortalFeatureState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DevToolPortalInstance + { + internal DevToolPortalInstance() { } + public string Name { get { throw null; } } + public string Status { get { throw null; } } + } + public partial class DevToolPortalProperties + { + public DevToolPortalProperties() { } + public Azure.ResourceManager.AppPlatform.Models.DevToolPortalFeatureSettings Features { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList Instances { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.DevToolPortalProvisioningState? ProvisioningState { get { throw null; } } + public bool? Public { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.DevToolPortalResourceRequests ResourceRequests { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.DevToolPortalSsoProperties SsoProperties { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DevToolPortalProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DevToolPortalProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.DevToolPortalProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.DevToolPortalProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.DevToolPortalProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.DevToolPortalProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.DevToolPortalProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.DevToolPortalProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.DevToolPortalProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppPlatform.Models.DevToolPortalProvisioningState left, Azure.ResourceManager.AppPlatform.Models.DevToolPortalProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.DevToolPortalProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.DevToolPortalProvisioningState left, Azure.ResourceManager.AppPlatform.Models.DevToolPortalProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DevToolPortalResourceRequests + { + internal DevToolPortalResourceRequests() { } + public string Cpu { get { throw null; } } + public int? InstanceCount { get { throw null; } } + public string Memory { get { throw null; } } + } + public partial class DevToolPortalSsoProperties + { + public DevToolPortalSsoProperties() { } + public string ClientId { get { throw null; } set { } } + public string ClientSecret { get { throw null; } set { } } + public System.Uri MetadataUri { get { throw null; } set { } } + public System.Collections.Generic.IList Scopes { get { throw null; } } + } + public partial class GatewayPropertiesEnvironmentVariables + { + public GatewayPropertiesEnvironmentVariables() { } + public System.Collections.Generic.IDictionary Properties { get { throw null; } } + public System.Collections.Generic.IDictionary Secrets { get { throw null; } } + } + public partial class HttpScaleRule + { + public HttpScaleRule() { } + public System.Collections.Generic.IList Auth { get { throw null; } } + public System.Collections.Generic.IDictionary Metadata { get { throw null; } } + } public partial class JarUploadedUserSourceInfo : Azure.ResourceManager.AppPlatform.Models.AppPlatformUploadedUserSourceInfo { public JarUploadedUserSourceInfo() { } @@ -2312,21 +2834,117 @@ public JarUploadedUserSourceInfo() { } public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.KPackBuildStageProvisioningState left, Azure.ResourceManager.AppPlatform.Models.KPackBuildStageProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class MarketplaceResource + { + public MarketplaceResource() { } + public string Plan { get { throw null; } set { } } + public string Product { get { throw null; } set { } } + public string Publisher { get { throw null; } set { } } + } public partial class NetCoreZipUploadedUserSourceInfo : Azure.ResourceManager.AppPlatform.Models.AppPlatformUploadedUserSourceInfo { public NetCoreZipUploadedUserSourceInfo() { } public string NetCoreMainEntryPath { get { throw null; } set { } } public string RuntimeVersion { get { throw null; } set { } } } + public partial class PredefinedAcceleratorProperties + { + public PredefinedAcceleratorProperties() { } + public System.Collections.Generic.IReadOnlyList AcceleratorTags { get { throw null; } } + public string Description { get { throw null; } } + public string DisplayName { get { throw null; } } + public System.Uri IconUri { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.PredefinedAcceleratorProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.PredefinedAcceleratorState? State { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PredefinedAcceleratorProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PredefinedAcceleratorProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.PredefinedAcceleratorProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.PredefinedAcceleratorProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.PredefinedAcceleratorProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.PredefinedAcceleratorProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.PredefinedAcceleratorProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppPlatform.Models.PredefinedAcceleratorProvisioningState left, Azure.ResourceManager.AppPlatform.Models.PredefinedAcceleratorProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.PredefinedAcceleratorProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.PredefinedAcceleratorProvisioningState left, Azure.ResourceManager.AppPlatform.Models.PredefinedAcceleratorProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PredefinedAcceleratorState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PredefinedAcceleratorState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.PredefinedAcceleratorState Disabled { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.PredefinedAcceleratorState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.PredefinedAcceleratorState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppPlatform.Models.PredefinedAcceleratorState left, Azure.ResourceManager.AppPlatform.Models.PredefinedAcceleratorState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.PredefinedAcceleratorState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.PredefinedAcceleratorState left, Azure.ResourceManager.AppPlatform.Models.PredefinedAcceleratorState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class QueueScaleRule + { + public QueueScaleRule() { } + public System.Collections.Generic.IList Auth { get { throw null; } } + public int? QueueLength { get { throw null; } set { } } + public string QueueName { get { throw null; } set { } } + } public partial class RegenerateAppPlatformServiceTestKeyContent { public RegenerateAppPlatformServiceTestKeyContent(Azure.ResourceManager.AppPlatform.Models.AppPlatformServiceTestKeyType keyType) { } public Azure.ResourceManager.AppPlatform.Models.AppPlatformServiceTestKeyType KeyType { get { throw null; } } } + public partial class Scale + { + public Scale() { } + public int? MaxReplicas { get { throw null; } set { } } + public int? MinReplicas { get { throw null; } set { } } + public System.Collections.Generic.IList Rules { get { throw null; } } + } + public partial class ScaleRule + { + public ScaleRule() { } + public Azure.ResourceManager.AppPlatform.Models.QueueScaleRule AzureQueue { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.CustomScaleRule Custom { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.HttpScaleRule Http { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.TcpScaleRule Tcp { get { throw null; } set { } } + } + public partial class ScaleRuleAuth + { + public ScaleRuleAuth() { } + public string SecretRef { get { throw null; } set { } } + public string TriggerParameter { get { throw null; } set { } } + } + public partial class Secret + { + public Secret() { } + public string Name { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + } public partial class SourceUploadedUserSourceInfo : Azure.ResourceManager.AppPlatform.Models.AppPlatformUploadedUserSourceInfo { public SourceUploadedUserSourceInfo() { } public string ArtifactSelector { get { throw null; } set { } } public string RuntimeVersion { get { throw null; } set { } } } + public partial class TcpScaleRule + { + public TcpScaleRule() { } + public System.Collections.Generic.IList Auth { get { throw null; } } + public System.Collections.Generic.IDictionary Metadata { get { throw null; } } + } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformGatewayResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformGatewayResource.cs index 2a4a52e4a3b9..990669915212 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformGatewayResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformGatewayResource.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using System.Globalization; using System.Threading; using System.Threading.Tasks; @@ -326,7 +327,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Create the default Spring Cloud Gateway or update the existing Spring Cloud Gateway. + /// Operation to update an exiting Spring Cloud Gateway capacity. /// /// /// Request Path @@ -334,24 +335,24 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// Gateways_CreateOrUpdate + /// Gateways_UpdateCapacity /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The gateway for the create or update operation. + /// The gateway capacity for the update operation. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, AppPlatformGatewayData data, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, AppPlatformGatewayPatch patch, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(patch, nameof(patch)); using var scope = _appPlatformGatewayGatewaysClientDiagnostics.CreateScope("AppPlatformGatewayResource.Update"); scope.Start(); try { - var response = await _appPlatformGatewayGatewaysRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(new AppPlatformGatewayOperationSource(Client), _appPlatformGatewayGatewaysClientDiagnostics, Pipeline, _appPlatformGatewayGatewaysRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var response = await _appPlatformGatewayGatewaysRestClient.UpdateCapacityAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new AppPlatformGatewayOperationSource(Client), _appPlatformGatewayGatewaysClientDiagnostics, Pipeline, _appPlatformGatewayGatewaysRestClient.CreateUpdateCapacityRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -364,7 +365,7 @@ public virtual async Task> UpdateAsync( } /// - /// Create the default Spring Cloud Gateway or update the existing Spring Cloud Gateway. + /// Operation to update an exiting Spring Cloud Gateway capacity. /// /// /// Request Path @@ -372,24 +373,24 @@ public virtual async Task> UpdateAsync( /// /// /// Operation Id - /// Gateways_CreateOrUpdate + /// Gateways_UpdateCapacity /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The gateway for the create or update operation. + /// The gateway capacity for the update operation. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, AppPlatformGatewayData data, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, AppPlatformGatewayPatch patch, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(patch, nameof(patch)); using var scope = _appPlatformGatewayGatewaysClientDiagnostics.CreateScope("AppPlatformGatewayResource.Update"); scope.Start(); try { - var response = _appPlatformGatewayGatewaysRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new AppPlatformArmOperation(new AppPlatformGatewayOperationSource(Client), _appPlatformGatewayGatewaysClientDiagnostics, Pipeline, _appPlatformGatewayGatewaysRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var response = _appPlatformGatewayGatewaysRestClient.UpdateCapacity(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new AppPlatformArmOperation(new AppPlatformGatewayOperationSource(Client), _appPlatformGatewayGatewaysClientDiagnostics, Pipeline, _appPlatformGatewayGatewaysRestClient.CreateUpdateCapacityRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -401,6 +402,66 @@ public virtual ArmOperation Update(WaitUntil waitUnt } } + /// + /// List sensitive environment variables of Spring Cloud Gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/listEnvSecrets + /// + /// + /// Operation Id + /// Gateways_ListEnvSecrets + /// + /// + /// + /// The cancellation token to use. + public virtual async Task>> GetEnvSecretsAsync(CancellationToken cancellationToken = default) + { + using var scope = _appPlatformGatewayGatewaysClientDiagnostics.CreateScope("AppPlatformGatewayResource.GetEnvSecrets"); + scope.Start(); + try + { + var response = await _appPlatformGatewayGatewaysRestClient.ListEnvSecretsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List sensitive environment variables of Spring Cloud Gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/listEnvSecrets + /// + /// + /// Operation Id + /// Gateways_ListEnvSecrets + /// + /// + /// + /// The cancellation token to use. + public virtual Response> GetEnvSecrets(CancellationToken cancellationToken = default) + { + using var scope = _appPlatformGatewayGatewaysClientDiagnostics.CreateScope("AppPlatformGatewayResource.GetEnvSecrets"); + scope.Start(); + try + { + var response = _appPlatformGatewayGatewaysRestClient.ListEnvSecrets(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Check the domains are valid as well as not in use. /// diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformServiceResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformServiceResource.cs index 51537176a339..2ce7848a520b 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformServiceResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformServiceResource.cs @@ -38,6 +38,8 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ServicesRestOperations _appPlatformServiceServicesRestClient; private readonly ClientDiagnostics _appPlatformConfigServerConfigServersClientDiagnostics; private readonly ConfigServersRestOperations _appPlatformConfigServerConfigServersRestClient; + private readonly ClientDiagnostics _appPlatformBuildpackBindingBuildpackBindingClientDiagnostics; + private readonly BuildpackBindingRestOperations _appPlatformBuildpackBindingBuildpackBindingRestClient; private readonly ClientDiagnostics _appPlatformDeploymentDeploymentsClientDiagnostics; private readonly DeploymentsRestOperations _appPlatformDeploymentDeploymentsRestClient; private readonly AppPlatformServiceData _data; @@ -67,6 +69,9 @@ internal AppPlatformServiceResource(ArmClient client, ResourceIdentifier id) : b _appPlatformConfigServerConfigServersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", AppPlatformConfigServerResource.ResourceType.Namespace, Diagnostics); TryGetApiVersion(AppPlatformConfigServerResource.ResourceType, out string appPlatformConfigServerConfigServersApiVersion); _appPlatformConfigServerConfigServersRestClient = new ConfigServersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appPlatformConfigServerConfigServersApiVersion); + _appPlatformBuildpackBindingBuildpackBindingClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", AppPlatformBuildpackBindingResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AppPlatformBuildpackBindingResource.ResourceType, out string appPlatformBuildpackBindingBuildpackBindingApiVersion); + _appPlatformBuildpackBindingBuildpackBindingRestClient = new BuildpackBindingRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appPlatformBuildpackBindingBuildpackBindingApiVersion); _appPlatformDeploymentDeploymentsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", AppPlatformDeploymentResource.ResourceType.Namespace, Diagnostics); TryGetApiVersion(AppPlatformDeploymentResource.ResourceType, out string appPlatformDeploymentDeploymentsApiVersion); _appPlatformDeploymentDeploymentsRestClient = new DeploymentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appPlatformDeploymentDeploymentsApiVersion); @@ -212,6 +217,112 @@ public virtual Response GetAppPlatformServic return GetAppPlatformServiceRegistries().Get(serviceRegistryName, cancellationToken); } + /// Gets a collection of ApplicationLiveViewResources in the AppPlatformService. + /// An object representing collection of ApplicationLiveViewResources and their operations over a ApplicationLiveViewResource. + public virtual ApplicationLiveViewResourceCollection GetApplicationLiveViewResources() + { + return GetCachedClient(Client => new ApplicationLiveViewResourceCollection(Client, Id)); + } + + /// + /// Get the Application Live and its properties. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationLiveViews/{applicationLiveViewName} + /// + /// + /// Operation Id + /// ApplicationLiveViews_Get + /// + /// + /// + /// The name of Application Live View. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetApplicationLiveViewResourceAsync(string applicationLiveViewName, CancellationToken cancellationToken = default) + { + return await GetApplicationLiveViewResources().GetAsync(applicationLiveViewName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the Application Live and its properties. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationLiveViews/{applicationLiveViewName} + /// + /// + /// Operation Id + /// ApplicationLiveViews_Get + /// + /// + /// + /// The name of Application Live View. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetApplicationLiveViewResource(string applicationLiveViewName, CancellationToken cancellationToken = default) + { + return GetApplicationLiveViewResources().Get(applicationLiveViewName, cancellationToken); + } + + /// Gets a collection of DevToolPortalResources in the AppPlatformService. + /// An object representing collection of DevToolPortalResources and their operations over a DevToolPortalResource. + public virtual DevToolPortalResourceCollection GetDevToolPortalResources() + { + return GetCachedClient(Client => new DevToolPortalResourceCollection(Client, Id)); + } + + /// + /// Get the Application Live and its properties. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/DevToolPortals/{devToolPortalName} + /// + /// + /// Operation Id + /// DevToolPortals_Get + /// + /// + /// + /// The name of Dev Tool Portal. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetDevToolPortalResourceAsync(string devToolPortalName, CancellationToken cancellationToken = default) + { + return await GetDevToolPortalResources().GetAsync(devToolPortalName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the Application Live and its properties. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/DevToolPortals/{devToolPortalName} + /// + /// + /// Operation Id + /// DevToolPortals_Get + /// + /// + /// + /// The name of Dev Tool Portal. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetDevToolPortalResource(string devToolPortalName, CancellationToken cancellationToken = default) + { + return GetDevToolPortalResources().Get(devToolPortalName, cancellationToken); + } + /// Gets a collection of AppPlatformBuildServiceResources in the AppPlatformService. /// An object representing collection of AppPlatformBuildServiceResources and their operations over a AppPlatformBuildServiceResource. public virtual AppPlatformBuildServiceCollection GetAppPlatformBuildServices() @@ -539,6 +650,59 @@ public virtual Response GetAppPlatformApiPortal(st return GetAppPlatformApiPortals().Get(apiPortalName, cancellationToken); } + /// Gets a collection of ApplicationAcceleratorResources in the AppPlatformService. + /// An object representing collection of ApplicationAcceleratorResources and their operations over a ApplicationAcceleratorResource. + public virtual ApplicationAcceleratorResourceCollection GetApplicationAcceleratorResources() + { + return GetCachedClient(Client => new ApplicationAcceleratorResourceCollection(Client, Id)); + } + + /// + /// Get the application accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName} + /// + /// + /// Operation Id + /// ApplicationAccelerators_Get + /// + /// + /// + /// The name of the application accelerator. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetApplicationAcceleratorResourceAsync(string applicationAcceleratorName, CancellationToken cancellationToken = default) + { + return await GetApplicationAcceleratorResources().GetAsync(applicationAcceleratorName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the application accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName} + /// + /// + /// Operation Id + /// ApplicationAccelerators_Get + /// + /// + /// + /// The name of the application accelerator. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetApplicationAcceleratorResource(string applicationAcceleratorName, CancellationToken cancellationToken = default) + { + return GetApplicationAcceleratorResources().Get(applicationAcceleratorName, cancellationToken); + } + /// /// Get a Service and its properties. /// @@ -1207,6 +1371,50 @@ public virtual ArmOperation ValidateConfigSe } } + /// + /// Get collection of buildpack bindings under all builders. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildpackBindings + /// + /// + /// Operation Id + /// BuildpackBinding_ListForCluster + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetForClusterBuildpackBindingsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _appPlatformBuildpackBindingBuildpackBindingRestClient.CreateListForClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _appPlatformBuildpackBindingBuildpackBindingRestClient.CreateListForClusterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AppPlatformBuildpackBindingResource(Client, AppPlatformBuildpackBindingData.DeserializeAppPlatformBuildpackBindingData(e)), _appPlatformBuildpackBindingBuildpackBindingClientDiagnostics, Pipeline, "AppPlatformServiceResource.GetForClusterBuildpackBindings", "value", "nextLink", cancellationToken); + } + + /// + /// Get collection of buildpack bindings under all builders. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildpackBindings + /// + /// + /// Operation Id + /// BuildpackBinding_ListForCluster + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetForClusterBuildpackBindings(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _appPlatformBuildpackBindingBuildpackBindingRestClient.CreateListForClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _appPlatformBuildpackBindingBuildpackBindingRestClient.CreateListForClusterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AppPlatformBuildpackBindingResource(Client, AppPlatformBuildpackBindingData.DeserializeAppPlatformBuildpackBindingData(e)), _appPlatformBuildpackBindingBuildpackBindingClientDiagnostics, Pipeline, "AppPlatformServiceResource.GetForClusterBuildpackBindings", "value", "nextLink", cancellationToken); + } + /// /// List deployments for a certain service /// diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApplicationAcceleratorResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApplicationAcceleratorResource.cs new file mode 100644 index 000000000000..84c9fcc093be --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApplicationAcceleratorResource.cs @@ -0,0 +1,403 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.AppPlatform +{ + /// + /// A Class representing an ApplicationAcceleratorResource along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetApplicationAcceleratorResource method. + /// Otherwise you can get one from its parent resource using the GetApplicationAcceleratorResource method. + /// + public partial class ApplicationAcceleratorResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _applicationAcceleratorResourceApplicationAcceleratorsClientDiagnostics; + private readonly ApplicationAcceleratorsRestOperations _applicationAcceleratorResourceApplicationAcceleratorsRestClient; + private readonly ApplicationAcceleratorResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected ApplicationAcceleratorResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ApplicationAcceleratorResource(ArmClient client, ApplicationAcceleratorResourceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ApplicationAcceleratorResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _applicationAcceleratorResourceApplicationAcceleratorsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string applicationAcceleratorResourceApplicationAcceleratorsApiVersion); + _applicationAcceleratorResourceApplicationAcceleratorsRestClient = new ApplicationAcceleratorsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, applicationAcceleratorResourceApplicationAcceleratorsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/applicationAccelerators"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ApplicationAcceleratorResourceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of CustomizedAcceleratorResources in the ApplicationAcceleratorResource. + /// An object representing collection of CustomizedAcceleratorResources and their operations over a CustomizedAcceleratorResource. + public virtual CustomizedAcceleratorResourceCollection GetCustomizedAcceleratorResources() + { + return GetCachedClient(Client => new CustomizedAcceleratorResourceCollection(Client, Id)); + } + + /// + /// Get the customized accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators/{customizedAcceleratorName} + /// + /// + /// Operation Id + /// CustomizedAccelerators_Get + /// + /// + /// + /// The name of the customized accelerator. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetCustomizedAcceleratorResourceAsync(string customizedAcceleratorName, CancellationToken cancellationToken = default) + { + return await GetCustomizedAcceleratorResources().GetAsync(customizedAcceleratorName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the customized accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators/{customizedAcceleratorName} + /// + /// + /// Operation Id + /// CustomizedAccelerators_Get + /// + /// + /// + /// The name of the customized accelerator. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetCustomizedAcceleratorResource(string customizedAcceleratorName, CancellationToken cancellationToken = default) + { + return GetCustomizedAcceleratorResources().Get(customizedAcceleratorName, cancellationToken); + } + + /// Gets a collection of PredefinedAcceleratorResources in the ApplicationAcceleratorResource. + /// An object representing collection of PredefinedAcceleratorResources and their operations over a PredefinedAcceleratorResource. + public virtual PredefinedAcceleratorResourceCollection GetPredefinedAcceleratorResources() + { + return GetCachedClient(Client => new PredefinedAcceleratorResourceCollection(Client, Id)); + } + + /// + /// Get the predefined accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/predefinedAccelerators/{predefinedAcceleratorName} + /// + /// + /// Operation Id + /// PredefinedAccelerators_Get + /// + /// + /// + /// The name of the predefined accelerator. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetPredefinedAcceleratorResourceAsync(string predefinedAcceleratorName, CancellationToken cancellationToken = default) + { + return await GetPredefinedAcceleratorResources().GetAsync(predefinedAcceleratorName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the predefined accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/predefinedAccelerators/{predefinedAcceleratorName} + /// + /// + /// Operation Id + /// PredefinedAccelerators_Get + /// + /// + /// + /// The name of the predefined accelerator. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetPredefinedAcceleratorResource(string predefinedAcceleratorName, CancellationToken cancellationToken = default) + { + return GetPredefinedAcceleratorResources().Get(predefinedAcceleratorName, cancellationToken); + } + + /// + /// Get the application accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName} + /// + /// + /// Operation Id + /// ApplicationAccelerators_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _applicationAcceleratorResourceApplicationAcceleratorsClientDiagnostics.CreateScope("ApplicationAcceleratorResource.Get"); + scope.Start(); + try + { + var response = await _applicationAcceleratorResourceApplicationAcceleratorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ApplicationAcceleratorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the application accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName} + /// + /// + /// Operation Id + /// ApplicationAccelerators_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _applicationAcceleratorResourceApplicationAcceleratorsClientDiagnostics.CreateScope("ApplicationAcceleratorResource.Get"); + scope.Start(); + try + { + var response = _applicationAcceleratorResourceApplicationAcceleratorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ApplicationAcceleratorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the application accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName} + /// + /// + /// Operation Id + /// ApplicationAccelerators_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _applicationAcceleratorResourceApplicationAcceleratorsClientDiagnostics.CreateScope("ApplicationAcceleratorResource.Delete"); + scope.Start(); + try + { + var response = await _applicationAcceleratorResourceApplicationAcceleratorsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_applicationAcceleratorResourceApplicationAcceleratorsClientDiagnostics, Pipeline, _applicationAcceleratorResourceApplicationAcceleratorsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the application accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName} + /// + /// + /// Operation Id + /// ApplicationAccelerators_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _applicationAcceleratorResourceApplicationAcceleratorsClientDiagnostics.CreateScope("ApplicationAcceleratorResource.Delete"); + scope.Start(); + try + { + var response = _applicationAcceleratorResourceApplicationAcceleratorsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_applicationAcceleratorResourceApplicationAcceleratorsClientDiagnostics, Pipeline, _applicationAcceleratorResourceApplicationAcceleratorsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update the application accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName} + /// + /// + /// Operation Id + /// ApplicationAccelerators_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The application accelerator for the create or update operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ApplicationAcceleratorResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _applicationAcceleratorResourceApplicationAcceleratorsClientDiagnostics.CreateScope("ApplicationAcceleratorResource.Update"); + scope.Start(); + try + { + var response = await _applicationAcceleratorResourceApplicationAcceleratorsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new ApplicationAcceleratorResourceOperationSource(Client), _applicationAcceleratorResourceApplicationAcceleratorsClientDiagnostics, Pipeline, _applicationAcceleratorResourceApplicationAcceleratorsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update the application accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName} + /// + /// + /// Operation Id + /// ApplicationAccelerators_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The application accelerator for the create or update operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ApplicationAcceleratorResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _applicationAcceleratorResourceApplicationAcceleratorsClientDiagnostics.CreateScope("ApplicationAcceleratorResource.Update"); + scope.Start(); + try + { + var response = _applicationAcceleratorResourceApplicationAcceleratorsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new ApplicationAcceleratorResourceOperationSource(Client), _applicationAcceleratorResourceApplicationAcceleratorsClientDiagnostics, Pipeline, _applicationAcceleratorResourceApplicationAcceleratorsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApplicationAcceleratorResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApplicationAcceleratorResourceCollection.cs new file mode 100644 index 000000000000..3c3a80311302 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApplicationAcceleratorResourceCollection.cs @@ -0,0 +1,340 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.AppPlatform +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetApplicationAcceleratorResources method from an instance of . + /// + public partial class ApplicationAcceleratorResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _applicationAcceleratorResourceApplicationAcceleratorsClientDiagnostics; + private readonly ApplicationAcceleratorsRestOperations _applicationAcceleratorResourceApplicationAcceleratorsRestClient; + + /// Initializes a new instance of the class for mocking. + protected ApplicationAcceleratorResourceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ApplicationAcceleratorResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _applicationAcceleratorResourceApplicationAcceleratorsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ApplicationAcceleratorResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ApplicationAcceleratorResource.ResourceType, out string applicationAcceleratorResourceApplicationAcceleratorsApiVersion); + _applicationAcceleratorResourceApplicationAcceleratorsRestClient = new ApplicationAcceleratorsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, applicationAcceleratorResourceApplicationAcceleratorsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != AppPlatformServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AppPlatformServiceResource.ResourceType), nameof(id)); + } + + /// + /// Create or update the application accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName} + /// + /// + /// Operation Id + /// ApplicationAccelerators_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the application accelerator. + /// The application accelerator for the create or update operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string applicationAcceleratorName, ApplicationAcceleratorResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _applicationAcceleratorResourceApplicationAcceleratorsClientDiagnostics.CreateScope("ApplicationAcceleratorResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _applicationAcceleratorResourceApplicationAcceleratorsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationAcceleratorName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new ApplicationAcceleratorResourceOperationSource(Client), _applicationAcceleratorResourceApplicationAcceleratorsClientDiagnostics, Pipeline, _applicationAcceleratorResourceApplicationAcceleratorsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationAcceleratorName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update the application accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName} + /// + /// + /// Operation Id + /// ApplicationAccelerators_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the application accelerator. + /// The application accelerator for the create or update operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string applicationAcceleratorName, ApplicationAcceleratorResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _applicationAcceleratorResourceApplicationAcceleratorsClientDiagnostics.CreateScope("ApplicationAcceleratorResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _applicationAcceleratorResourceApplicationAcceleratorsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationAcceleratorName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new ApplicationAcceleratorResourceOperationSource(Client), _applicationAcceleratorResourceApplicationAcceleratorsClientDiagnostics, Pipeline, _applicationAcceleratorResourceApplicationAcceleratorsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationAcceleratorName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the application accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName} + /// + /// + /// Operation Id + /// ApplicationAccelerators_Get + /// + /// + /// + /// The name of the application accelerator. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string applicationAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + + using var scope = _applicationAcceleratorResourceApplicationAcceleratorsClientDiagnostics.CreateScope("ApplicationAcceleratorResourceCollection.Get"); + scope.Start(); + try + { + var response = await _applicationAcceleratorResourceApplicationAcceleratorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationAcceleratorName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ApplicationAcceleratorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the application accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName} + /// + /// + /// Operation Id + /// ApplicationAccelerators_Get + /// + /// + /// + /// The name of the application accelerator. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string applicationAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + + using var scope = _applicationAcceleratorResourceApplicationAcceleratorsClientDiagnostics.CreateScope("ApplicationAcceleratorResourceCollection.Get"); + scope.Start(); + try + { + var response = _applicationAcceleratorResourceApplicationAcceleratorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationAcceleratorName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ApplicationAcceleratorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Handle requests to list all application accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators + /// + /// + /// Operation Id + /// ApplicationAccelerators_List + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _applicationAcceleratorResourceApplicationAcceleratorsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _applicationAcceleratorResourceApplicationAcceleratorsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ApplicationAcceleratorResource(Client, ApplicationAcceleratorResourceData.DeserializeApplicationAcceleratorResourceData(e)), _applicationAcceleratorResourceApplicationAcceleratorsClientDiagnostics, Pipeline, "ApplicationAcceleratorResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Handle requests to list all application accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators + /// + /// + /// Operation Id + /// ApplicationAccelerators_List + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _applicationAcceleratorResourceApplicationAcceleratorsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _applicationAcceleratorResourceApplicationAcceleratorsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ApplicationAcceleratorResource(Client, ApplicationAcceleratorResourceData.DeserializeApplicationAcceleratorResourceData(e)), _applicationAcceleratorResourceApplicationAcceleratorsClientDiagnostics, Pipeline, "ApplicationAcceleratorResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName} + /// + /// + /// Operation Id + /// ApplicationAccelerators_Get + /// + /// + /// + /// The name of the application accelerator. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string applicationAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + + using var scope = _applicationAcceleratorResourceApplicationAcceleratorsClientDiagnostics.CreateScope("ApplicationAcceleratorResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _applicationAcceleratorResourceApplicationAcceleratorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationAcceleratorName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName} + /// + /// + /// Operation Id + /// ApplicationAccelerators_Get + /// + /// + /// + /// The name of the application accelerator. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string applicationAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + + using var scope = _applicationAcceleratorResourceApplicationAcceleratorsClientDiagnostics.CreateScope("ApplicationAcceleratorResourceCollection.Exists"); + scope.Start(); + try + { + var response = _applicationAcceleratorResourceApplicationAcceleratorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationAcceleratorName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApplicationAcceleratorResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApplicationAcceleratorResourceData.cs new file mode 100644 index 000000000000..b2e4fd50c9d8 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApplicationAcceleratorResourceData.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class representing the ApplicationAcceleratorResource data model. + public partial class ApplicationAcceleratorResourceData : ResourceData + { + /// Initializes a new instance of ApplicationAcceleratorResourceData. + public ApplicationAcceleratorResourceData() + { + } + + /// Initializes a new instance of ApplicationAcceleratorResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Application accelerator properties payload. + /// Sku of the application accelerator resource. + internal ApplicationAcceleratorResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ApplicationAcceleratorProperties properties, AppPlatformSku sku) : base(id, name, resourceType, systemData) + { + Properties = properties; + Sku = sku; + } + + /// Application accelerator properties payload. + public ApplicationAcceleratorProperties Properties { get; set; } + /// Sku of the application accelerator resource. + public AppPlatformSku Sku { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApplicationLiveViewResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApplicationLiveViewResource.cs new file mode 100644 index 000000000000..0a02de255114 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApplicationLiveViewResource.cs @@ -0,0 +1,297 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.AppPlatform +{ + /// + /// A Class representing an ApplicationLiveViewResource along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetApplicationLiveViewResource method. + /// Otherwise you can get one from its parent resource using the GetApplicationLiveViewResource method. + /// + public partial class ApplicationLiveViewResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string applicationLiveViewName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationLiveViews/{applicationLiveViewName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _applicationLiveViewResourceApplicationLiveViewsClientDiagnostics; + private readonly ApplicationLiveViewsRestOperations _applicationLiveViewResourceApplicationLiveViewsRestClient; + private readonly ApplicationLiveViewResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected ApplicationLiveViewResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ApplicationLiveViewResource(ArmClient client, ApplicationLiveViewResourceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ApplicationLiveViewResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _applicationLiveViewResourceApplicationLiveViewsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string applicationLiveViewResourceApplicationLiveViewsApiVersion); + _applicationLiveViewResourceApplicationLiveViewsRestClient = new ApplicationLiveViewsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, applicationLiveViewResourceApplicationLiveViewsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/applicationLiveViews"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ApplicationLiveViewResourceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get the Application Live and its properties. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationLiveViews/{applicationLiveViewName} + /// + /// + /// Operation Id + /// ApplicationLiveViews_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _applicationLiveViewResourceApplicationLiveViewsClientDiagnostics.CreateScope("ApplicationLiveViewResource.Get"); + scope.Start(); + try + { + var response = await _applicationLiveViewResourceApplicationLiveViewsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ApplicationLiveViewResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Application Live and its properties. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationLiveViews/{applicationLiveViewName} + /// + /// + /// Operation Id + /// ApplicationLiveViews_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _applicationLiveViewResourceApplicationLiveViewsClientDiagnostics.CreateScope("ApplicationLiveViewResource.Get"); + scope.Start(); + try + { + var response = _applicationLiveViewResourceApplicationLiveViewsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ApplicationLiveViewResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Disable the default Application Live View. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationLiveViews/{applicationLiveViewName} + /// + /// + /// Operation Id + /// ApplicationLiveViews_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _applicationLiveViewResourceApplicationLiveViewsClientDiagnostics.CreateScope("ApplicationLiveViewResource.Delete"); + scope.Start(); + try + { + var response = await _applicationLiveViewResourceApplicationLiveViewsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_applicationLiveViewResourceApplicationLiveViewsClientDiagnostics, Pipeline, _applicationLiveViewResourceApplicationLiveViewsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Disable the default Application Live View. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationLiveViews/{applicationLiveViewName} + /// + /// + /// Operation Id + /// ApplicationLiveViews_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _applicationLiveViewResourceApplicationLiveViewsClientDiagnostics.CreateScope("ApplicationLiveViewResource.Delete"); + scope.Start(); + try + { + var response = _applicationLiveViewResourceApplicationLiveViewsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_applicationLiveViewResourceApplicationLiveViewsClientDiagnostics, Pipeline, _applicationLiveViewResourceApplicationLiveViewsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create the default Application Live View or update the existing Application Live View. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationLiveViews/{applicationLiveViewName} + /// + /// + /// Operation Id + /// ApplicationLiveViews_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters for the update operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ApplicationLiveViewResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _applicationLiveViewResourceApplicationLiveViewsClientDiagnostics.CreateScope("ApplicationLiveViewResource.Update"); + scope.Start(); + try + { + var response = await _applicationLiveViewResourceApplicationLiveViewsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new ApplicationLiveViewResourceOperationSource(Client), _applicationLiveViewResourceApplicationLiveViewsClientDiagnostics, Pipeline, _applicationLiveViewResourceApplicationLiveViewsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create the default Application Live View or update the existing Application Live View. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationLiveViews/{applicationLiveViewName} + /// + /// + /// Operation Id + /// ApplicationLiveViews_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters for the update operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ApplicationLiveViewResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _applicationLiveViewResourceApplicationLiveViewsClientDiagnostics.CreateScope("ApplicationLiveViewResource.Update"); + scope.Start(); + try + { + var response = _applicationLiveViewResourceApplicationLiveViewsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new ApplicationLiveViewResourceOperationSource(Client), _applicationLiveViewResourceApplicationLiveViewsClientDiagnostics, Pipeline, _applicationLiveViewResourceApplicationLiveViewsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApplicationLiveViewResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApplicationLiveViewResourceCollection.cs new file mode 100644 index 000000000000..78e111bf98e8 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApplicationLiveViewResourceCollection.cs @@ -0,0 +1,340 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.AppPlatform +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetApplicationLiveViewResources method from an instance of . + /// + public partial class ApplicationLiveViewResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _applicationLiveViewResourceApplicationLiveViewsClientDiagnostics; + private readonly ApplicationLiveViewsRestOperations _applicationLiveViewResourceApplicationLiveViewsRestClient; + + /// Initializes a new instance of the class for mocking. + protected ApplicationLiveViewResourceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ApplicationLiveViewResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _applicationLiveViewResourceApplicationLiveViewsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ApplicationLiveViewResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ApplicationLiveViewResource.ResourceType, out string applicationLiveViewResourceApplicationLiveViewsApiVersion); + _applicationLiveViewResourceApplicationLiveViewsRestClient = new ApplicationLiveViewsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, applicationLiveViewResourceApplicationLiveViewsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != AppPlatformServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AppPlatformServiceResource.ResourceType), nameof(id)); + } + + /// + /// Create the default Application Live View or update the existing Application Live View. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationLiveViews/{applicationLiveViewName} + /// + /// + /// Operation Id + /// ApplicationLiveViews_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of Application Live View. + /// Parameters for the update operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string applicationLiveViewName, ApplicationLiveViewResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationLiveViewName, nameof(applicationLiveViewName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _applicationLiveViewResourceApplicationLiveViewsClientDiagnostics.CreateScope("ApplicationLiveViewResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _applicationLiveViewResourceApplicationLiveViewsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationLiveViewName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new ApplicationLiveViewResourceOperationSource(Client), _applicationLiveViewResourceApplicationLiveViewsClientDiagnostics, Pipeline, _applicationLiveViewResourceApplicationLiveViewsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationLiveViewName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create the default Application Live View or update the existing Application Live View. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationLiveViews/{applicationLiveViewName} + /// + /// + /// Operation Id + /// ApplicationLiveViews_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of Application Live View. + /// Parameters for the update operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string applicationLiveViewName, ApplicationLiveViewResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationLiveViewName, nameof(applicationLiveViewName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _applicationLiveViewResourceApplicationLiveViewsClientDiagnostics.CreateScope("ApplicationLiveViewResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _applicationLiveViewResourceApplicationLiveViewsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationLiveViewName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new ApplicationLiveViewResourceOperationSource(Client), _applicationLiveViewResourceApplicationLiveViewsClientDiagnostics, Pipeline, _applicationLiveViewResourceApplicationLiveViewsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationLiveViewName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Application Live and its properties. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationLiveViews/{applicationLiveViewName} + /// + /// + /// Operation Id + /// ApplicationLiveViews_Get + /// + /// + /// + /// The name of Application Live View. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string applicationLiveViewName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationLiveViewName, nameof(applicationLiveViewName)); + + using var scope = _applicationLiveViewResourceApplicationLiveViewsClientDiagnostics.CreateScope("ApplicationLiveViewResourceCollection.Get"); + scope.Start(); + try + { + var response = await _applicationLiveViewResourceApplicationLiveViewsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationLiveViewName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ApplicationLiveViewResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Application Live and its properties. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationLiveViews/{applicationLiveViewName} + /// + /// + /// Operation Id + /// ApplicationLiveViews_Get + /// + /// + /// + /// The name of Application Live View. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string applicationLiveViewName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationLiveViewName, nameof(applicationLiveViewName)); + + using var scope = _applicationLiveViewResourceApplicationLiveViewsClientDiagnostics.CreateScope("ApplicationLiveViewResourceCollection.Get"); + scope.Start(); + try + { + var response = _applicationLiveViewResourceApplicationLiveViewsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationLiveViewName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ApplicationLiveViewResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Handles requests to list all resources in a Service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationLiveViews + /// + /// + /// Operation Id + /// ApplicationLiveViews_List + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _applicationLiveViewResourceApplicationLiveViewsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _applicationLiveViewResourceApplicationLiveViewsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ApplicationLiveViewResource(Client, ApplicationLiveViewResourceData.DeserializeApplicationLiveViewResourceData(e)), _applicationLiveViewResourceApplicationLiveViewsClientDiagnostics, Pipeline, "ApplicationLiveViewResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Handles requests to list all resources in a Service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationLiveViews + /// + /// + /// Operation Id + /// ApplicationLiveViews_List + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _applicationLiveViewResourceApplicationLiveViewsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _applicationLiveViewResourceApplicationLiveViewsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ApplicationLiveViewResource(Client, ApplicationLiveViewResourceData.DeserializeApplicationLiveViewResourceData(e)), _applicationLiveViewResourceApplicationLiveViewsClientDiagnostics, Pipeline, "ApplicationLiveViewResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationLiveViews/{applicationLiveViewName} + /// + /// + /// Operation Id + /// ApplicationLiveViews_Get + /// + /// + /// + /// The name of Application Live View. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string applicationLiveViewName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationLiveViewName, nameof(applicationLiveViewName)); + + using var scope = _applicationLiveViewResourceApplicationLiveViewsClientDiagnostics.CreateScope("ApplicationLiveViewResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _applicationLiveViewResourceApplicationLiveViewsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationLiveViewName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationLiveViews/{applicationLiveViewName} + /// + /// + /// Operation Id + /// ApplicationLiveViews_Get + /// + /// + /// + /// The name of Application Live View. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string applicationLiveViewName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationLiveViewName, nameof(applicationLiveViewName)); + + using var scope = _applicationLiveViewResourceApplicationLiveViewsClientDiagnostics.CreateScope("ApplicationLiveViewResourceCollection.Exists"); + scope.Start(); + try + { + var response = _applicationLiveViewResourceApplicationLiveViewsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationLiveViewName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApplicationLiveViewResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApplicationLiveViewResourceData.cs new file mode 100644 index 000000000000..945a888aa7b5 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApplicationLiveViewResourceData.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class representing the ApplicationLiveViewResource data model. + public partial class ApplicationLiveViewResourceData : ResourceData + { + /// Initializes a new instance of ApplicationLiveViewResourceData. + public ApplicationLiveViewResourceData() + { + } + + /// Initializes a new instance of ApplicationLiveViewResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Application Live View properties payload. + internal ApplicationLiveViewResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ApplicationLiveViewProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// Application Live View properties payload. + public ApplicationLiveViewProperties Properties { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomizedAcceleratorResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomizedAcceleratorResource.cs new file mode 100644 index 000000000000..8be2ac7a1adf --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomizedAcceleratorResource.cs @@ -0,0 +1,366 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.AppPlatform.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + /// + /// A Class representing a CustomizedAcceleratorResource along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetCustomizedAcceleratorResource method. + /// Otherwise you can get one from its parent resource using the GetCustomizedAcceleratorResource method. + /// + public partial class CustomizedAcceleratorResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, string customizedAcceleratorName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators/{customizedAcceleratorName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _customizedAcceleratorResourceCustomizedAcceleratorsClientDiagnostics; + private readonly CustomizedAcceleratorsRestOperations _customizedAcceleratorResourceCustomizedAcceleratorsRestClient; + private readonly CustomizedAcceleratorResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected CustomizedAcceleratorResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal CustomizedAcceleratorResource(ArmClient client, CustomizedAcceleratorResourceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal CustomizedAcceleratorResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _customizedAcceleratorResourceCustomizedAcceleratorsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string customizedAcceleratorResourceCustomizedAcceleratorsApiVersion); + _customizedAcceleratorResourceCustomizedAcceleratorsRestClient = new CustomizedAcceleratorsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, customizedAcceleratorResourceCustomizedAcceleratorsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/applicationAccelerators/customizedAccelerators"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual CustomizedAcceleratorResourceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get the customized accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators/{customizedAcceleratorName} + /// + /// + /// Operation Id + /// CustomizedAccelerators_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _customizedAcceleratorResourceCustomizedAcceleratorsClientDiagnostics.CreateScope("CustomizedAcceleratorResource.Get"); + scope.Start(); + try + { + var response = await _customizedAcceleratorResourceCustomizedAcceleratorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CustomizedAcceleratorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the customized accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators/{customizedAcceleratorName} + /// + /// + /// Operation Id + /// CustomizedAccelerators_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _customizedAcceleratorResourceCustomizedAcceleratorsClientDiagnostics.CreateScope("CustomizedAcceleratorResource.Get"); + scope.Start(); + try + { + var response = _customizedAcceleratorResourceCustomizedAcceleratorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CustomizedAcceleratorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the customized accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators/{customizedAcceleratorName} + /// + /// + /// Operation Id + /// CustomizedAccelerators_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _customizedAcceleratorResourceCustomizedAcceleratorsClientDiagnostics.CreateScope("CustomizedAcceleratorResource.Delete"); + scope.Start(); + try + { + var response = await _customizedAcceleratorResourceCustomizedAcceleratorsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_customizedAcceleratorResourceCustomizedAcceleratorsClientDiagnostics, Pipeline, _customizedAcceleratorResourceCustomizedAcceleratorsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the customized accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators/{customizedAcceleratorName} + /// + /// + /// Operation Id + /// CustomizedAccelerators_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _customizedAcceleratorResourceCustomizedAcceleratorsClientDiagnostics.CreateScope("CustomizedAcceleratorResource.Delete"); + scope.Start(); + try + { + var response = _customizedAcceleratorResourceCustomizedAcceleratorsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_customizedAcceleratorResourceCustomizedAcceleratorsClientDiagnostics, Pipeline, _customizedAcceleratorResourceCustomizedAcceleratorsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update the customized accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators/{customizedAcceleratorName} + /// + /// + /// Operation Id + /// CustomizedAccelerators_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The customized accelerator for the create or update operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, CustomizedAcceleratorResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _customizedAcceleratorResourceCustomizedAcceleratorsClientDiagnostics.CreateScope("CustomizedAcceleratorResource.Update"); + scope.Start(); + try + { + var response = await _customizedAcceleratorResourceCustomizedAcceleratorsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new CustomizedAcceleratorResourceOperationSource(Client), _customizedAcceleratorResourceCustomizedAcceleratorsClientDiagnostics, Pipeline, _customizedAcceleratorResourceCustomizedAcceleratorsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update the customized accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators/{customizedAcceleratorName} + /// + /// + /// Operation Id + /// CustomizedAccelerators_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The customized accelerator for the create or update operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, CustomizedAcceleratorResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _customizedAcceleratorResourceCustomizedAcceleratorsClientDiagnostics.CreateScope("CustomizedAcceleratorResource.Update"); + scope.Start(); + try + { + var response = _customizedAcceleratorResourceCustomizedAcceleratorsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new CustomizedAcceleratorResourceOperationSource(Client), _customizedAcceleratorResourceCustomizedAcceleratorsClientDiagnostics, Pipeline, _customizedAcceleratorResourceCustomizedAcceleratorsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Check the customized accelerator are valid. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators/{customizedAcceleratorName}/validate + /// + /// + /// Operation Id + /// CustomizedAccelerators_Validate + /// + /// + /// + /// Customized accelerator properties to be validated. + /// The cancellation token to use. + /// is null. + public virtual async Task> ValidateAsync(CustomizedAcceleratorProperties properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(properties, nameof(properties)); + + using var scope = _customizedAcceleratorResourceCustomizedAcceleratorsClientDiagnostics.CreateScope("CustomizedAcceleratorResource.Validate"); + scope.Start(); + try + { + var response = await _customizedAcceleratorResourceCustomizedAcceleratorsRestClient.ValidateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, properties, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Check the customized accelerator are valid. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators/{customizedAcceleratorName}/validate + /// + /// + /// Operation Id + /// CustomizedAccelerators_Validate + /// + /// + /// + /// Customized accelerator properties to be validated. + /// The cancellation token to use. + /// is null. + public virtual Response Validate(CustomizedAcceleratorProperties properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(properties, nameof(properties)); + + using var scope = _customizedAcceleratorResourceCustomizedAcceleratorsClientDiagnostics.CreateScope("CustomizedAcceleratorResource.Validate"); + scope.Start(); + try + { + var response = _customizedAcceleratorResourceCustomizedAcceleratorsRestClient.Validate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, properties, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomizedAcceleratorResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomizedAcceleratorResourceCollection.cs new file mode 100644 index 000000000000..c85923659ea8 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomizedAcceleratorResourceCollection.cs @@ -0,0 +1,340 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.AppPlatform +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetCustomizedAcceleratorResources method from an instance of . + /// + public partial class CustomizedAcceleratorResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _customizedAcceleratorResourceCustomizedAcceleratorsClientDiagnostics; + private readonly CustomizedAcceleratorsRestOperations _customizedAcceleratorResourceCustomizedAcceleratorsRestClient; + + /// Initializes a new instance of the class for mocking. + protected CustomizedAcceleratorResourceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal CustomizedAcceleratorResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _customizedAcceleratorResourceCustomizedAcceleratorsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", CustomizedAcceleratorResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(CustomizedAcceleratorResource.ResourceType, out string customizedAcceleratorResourceCustomizedAcceleratorsApiVersion); + _customizedAcceleratorResourceCustomizedAcceleratorsRestClient = new CustomizedAcceleratorsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, customizedAcceleratorResourceCustomizedAcceleratorsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ApplicationAcceleratorResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ApplicationAcceleratorResource.ResourceType), nameof(id)); + } + + /// + /// Create or update the customized accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators/{customizedAcceleratorName} + /// + /// + /// Operation Id + /// CustomizedAccelerators_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the customized accelerator. + /// The customized accelerator for the create or update operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string customizedAcceleratorName, CustomizedAcceleratorResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(customizedAcceleratorName, nameof(customizedAcceleratorName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _customizedAcceleratorResourceCustomizedAcceleratorsClientDiagnostics.CreateScope("CustomizedAcceleratorResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _customizedAcceleratorResourceCustomizedAcceleratorsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, customizedAcceleratorName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new CustomizedAcceleratorResourceOperationSource(Client), _customizedAcceleratorResourceCustomizedAcceleratorsClientDiagnostics, Pipeline, _customizedAcceleratorResourceCustomizedAcceleratorsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, customizedAcceleratorName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update the customized accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators/{customizedAcceleratorName} + /// + /// + /// Operation Id + /// CustomizedAccelerators_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the customized accelerator. + /// The customized accelerator for the create or update operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string customizedAcceleratorName, CustomizedAcceleratorResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(customizedAcceleratorName, nameof(customizedAcceleratorName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _customizedAcceleratorResourceCustomizedAcceleratorsClientDiagnostics.CreateScope("CustomizedAcceleratorResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _customizedAcceleratorResourceCustomizedAcceleratorsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, customizedAcceleratorName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new CustomizedAcceleratorResourceOperationSource(Client), _customizedAcceleratorResourceCustomizedAcceleratorsClientDiagnostics, Pipeline, _customizedAcceleratorResourceCustomizedAcceleratorsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, customizedAcceleratorName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the customized accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators/{customizedAcceleratorName} + /// + /// + /// Operation Id + /// CustomizedAccelerators_Get + /// + /// + /// + /// The name of the customized accelerator. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string customizedAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(customizedAcceleratorName, nameof(customizedAcceleratorName)); + + using var scope = _customizedAcceleratorResourceCustomizedAcceleratorsClientDiagnostics.CreateScope("CustomizedAcceleratorResourceCollection.Get"); + scope.Start(); + try + { + var response = await _customizedAcceleratorResourceCustomizedAcceleratorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, customizedAcceleratorName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CustomizedAcceleratorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the customized accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators/{customizedAcceleratorName} + /// + /// + /// Operation Id + /// CustomizedAccelerators_Get + /// + /// + /// + /// The name of the customized accelerator. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string customizedAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(customizedAcceleratorName, nameof(customizedAcceleratorName)); + + using var scope = _customizedAcceleratorResourceCustomizedAcceleratorsClientDiagnostics.CreateScope("CustomizedAcceleratorResourceCollection.Get"); + scope.Start(); + try + { + var response = _customizedAcceleratorResourceCustomizedAcceleratorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, customizedAcceleratorName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CustomizedAcceleratorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Handle requests to list all customized accelerators. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators + /// + /// + /// Operation Id + /// CustomizedAccelerators_List + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _customizedAcceleratorResourceCustomizedAcceleratorsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _customizedAcceleratorResourceCustomizedAcceleratorsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new CustomizedAcceleratorResource(Client, CustomizedAcceleratorResourceData.DeserializeCustomizedAcceleratorResourceData(e)), _customizedAcceleratorResourceCustomizedAcceleratorsClientDiagnostics, Pipeline, "CustomizedAcceleratorResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Handle requests to list all customized accelerators. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators + /// + /// + /// Operation Id + /// CustomizedAccelerators_List + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _customizedAcceleratorResourceCustomizedAcceleratorsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _customizedAcceleratorResourceCustomizedAcceleratorsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new CustomizedAcceleratorResource(Client, CustomizedAcceleratorResourceData.DeserializeCustomizedAcceleratorResourceData(e)), _customizedAcceleratorResourceCustomizedAcceleratorsClientDiagnostics, Pipeline, "CustomizedAcceleratorResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators/{customizedAcceleratorName} + /// + /// + /// Operation Id + /// CustomizedAccelerators_Get + /// + /// + /// + /// The name of the customized accelerator. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string customizedAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(customizedAcceleratorName, nameof(customizedAcceleratorName)); + + using var scope = _customizedAcceleratorResourceCustomizedAcceleratorsClientDiagnostics.CreateScope("CustomizedAcceleratorResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _customizedAcceleratorResourceCustomizedAcceleratorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, customizedAcceleratorName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators/{customizedAcceleratorName} + /// + /// + /// Operation Id + /// CustomizedAccelerators_Get + /// + /// + /// + /// The name of the customized accelerator. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string customizedAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(customizedAcceleratorName, nameof(customizedAcceleratorName)); + + using var scope = _customizedAcceleratorResourceCustomizedAcceleratorsClientDiagnostics.CreateScope("CustomizedAcceleratorResourceCollection.Exists"); + scope.Start(); + try + { + var response = _customizedAcceleratorResourceCustomizedAcceleratorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, customizedAcceleratorName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomizedAcceleratorResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomizedAcceleratorResourceData.cs new file mode 100644 index 000000000000..45acc3b2ca3a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomizedAcceleratorResourceData.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class representing the CustomizedAcceleratorResource data model. + public partial class CustomizedAcceleratorResourceData : ResourceData + { + /// Initializes a new instance of CustomizedAcceleratorResourceData. + public CustomizedAcceleratorResourceData() + { + } + + /// Initializes a new instance of CustomizedAcceleratorResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Customized accelerator properties payload. + /// Sku of the customized accelerator resource. + internal CustomizedAcceleratorResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, CustomizedAcceleratorProperties properties, AppPlatformSku sku) : base(id, name, resourceType, systemData) + { + Properties = properties; + Sku = sku; + } + + /// Customized accelerator properties payload. + public CustomizedAcceleratorProperties Properties { get; set; } + /// Sku of the customized accelerator resource. + public AppPlatformSku Sku { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DevToolPortalResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DevToolPortalResource.cs new file mode 100644 index 000000000000..17b70bcf52a4 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DevToolPortalResource.cs @@ -0,0 +1,297 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.AppPlatform +{ + /// + /// A Class representing a DevToolPortalResource along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDevToolPortalResource method. + /// Otherwise you can get one from its parent resource using the GetDevToolPortalResource method. + /// + public partial class DevToolPortalResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string devToolPortalName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/DevToolPortals/{devToolPortalName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _devToolPortalResourceDevToolPortalsClientDiagnostics; + private readonly DevToolPortalsRestOperations _devToolPortalResourceDevToolPortalsRestClient; + private readonly DevToolPortalResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected DevToolPortalResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DevToolPortalResource(ArmClient client, DevToolPortalResourceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DevToolPortalResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _devToolPortalResourceDevToolPortalsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string devToolPortalResourceDevToolPortalsApiVersion); + _devToolPortalResourceDevToolPortalsRestClient = new DevToolPortalsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devToolPortalResourceDevToolPortalsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/DevToolPortals"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DevToolPortalResourceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get the Application Live and its properties. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/DevToolPortals/{devToolPortalName} + /// + /// + /// Operation Id + /// DevToolPortals_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _devToolPortalResourceDevToolPortalsClientDiagnostics.CreateScope("DevToolPortalResource.Get"); + scope.Start(); + try + { + var response = await _devToolPortalResourceDevToolPortalsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevToolPortalResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Application Live and its properties. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/DevToolPortals/{devToolPortalName} + /// + /// + /// Operation Id + /// DevToolPortals_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _devToolPortalResourceDevToolPortalsClientDiagnostics.CreateScope("DevToolPortalResource.Get"); + scope.Start(); + try + { + var response = _devToolPortalResourceDevToolPortalsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevToolPortalResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Disable the default Dev Tool Portal. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/DevToolPortals/{devToolPortalName} + /// + /// + /// Operation Id + /// DevToolPortals_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _devToolPortalResourceDevToolPortalsClientDiagnostics.CreateScope("DevToolPortalResource.Delete"); + scope.Start(); + try + { + var response = await _devToolPortalResourceDevToolPortalsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_devToolPortalResourceDevToolPortalsClientDiagnostics, Pipeline, _devToolPortalResourceDevToolPortalsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Disable the default Dev Tool Portal. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/DevToolPortals/{devToolPortalName} + /// + /// + /// Operation Id + /// DevToolPortals_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _devToolPortalResourceDevToolPortalsClientDiagnostics.CreateScope("DevToolPortalResource.Delete"); + scope.Start(); + try + { + var response = _devToolPortalResourceDevToolPortalsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_devToolPortalResourceDevToolPortalsClientDiagnostics, Pipeline, _devToolPortalResourceDevToolPortalsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create the default Dev Tool Portal or update the existing Dev Tool Portal. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/DevToolPortals/{devToolPortalName} + /// + /// + /// Operation Id + /// DevToolPortals_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters for the create or update operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DevToolPortalResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _devToolPortalResourceDevToolPortalsClientDiagnostics.CreateScope("DevToolPortalResource.Update"); + scope.Start(); + try + { + var response = await _devToolPortalResourceDevToolPortalsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new DevToolPortalResourceOperationSource(Client), _devToolPortalResourceDevToolPortalsClientDiagnostics, Pipeline, _devToolPortalResourceDevToolPortalsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create the default Dev Tool Portal or update the existing Dev Tool Portal. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/DevToolPortals/{devToolPortalName} + /// + /// + /// Operation Id + /// DevToolPortals_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters for the create or update operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DevToolPortalResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _devToolPortalResourceDevToolPortalsClientDiagnostics.CreateScope("DevToolPortalResource.Update"); + scope.Start(); + try + { + var response = _devToolPortalResourceDevToolPortalsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new DevToolPortalResourceOperationSource(Client), _devToolPortalResourceDevToolPortalsClientDiagnostics, Pipeline, _devToolPortalResourceDevToolPortalsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DevToolPortalResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DevToolPortalResourceCollection.cs new file mode 100644 index 000000000000..6d0fae28fe09 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DevToolPortalResourceCollection.cs @@ -0,0 +1,340 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.AppPlatform +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDevToolPortalResources method from an instance of . + /// + public partial class DevToolPortalResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _devToolPortalResourceDevToolPortalsClientDiagnostics; + private readonly DevToolPortalsRestOperations _devToolPortalResourceDevToolPortalsRestClient; + + /// Initializes a new instance of the class for mocking. + protected DevToolPortalResourceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DevToolPortalResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _devToolPortalResourceDevToolPortalsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", DevToolPortalResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DevToolPortalResource.ResourceType, out string devToolPortalResourceDevToolPortalsApiVersion); + _devToolPortalResourceDevToolPortalsRestClient = new DevToolPortalsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, devToolPortalResourceDevToolPortalsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != AppPlatformServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AppPlatformServiceResource.ResourceType), nameof(id)); + } + + /// + /// Create the default Dev Tool Portal or update the existing Dev Tool Portal. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/DevToolPortals/{devToolPortalName} + /// + /// + /// Operation Id + /// DevToolPortals_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of Dev Tool Portal. + /// Parameters for the create or update operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string devToolPortalName, DevToolPortalResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(devToolPortalName, nameof(devToolPortalName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _devToolPortalResourceDevToolPortalsClientDiagnostics.CreateScope("DevToolPortalResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _devToolPortalResourceDevToolPortalsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, devToolPortalName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new DevToolPortalResourceOperationSource(Client), _devToolPortalResourceDevToolPortalsClientDiagnostics, Pipeline, _devToolPortalResourceDevToolPortalsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, devToolPortalName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create the default Dev Tool Portal or update the existing Dev Tool Portal. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/DevToolPortals/{devToolPortalName} + /// + /// + /// Operation Id + /// DevToolPortals_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of Dev Tool Portal. + /// Parameters for the create or update operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string devToolPortalName, DevToolPortalResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(devToolPortalName, nameof(devToolPortalName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _devToolPortalResourceDevToolPortalsClientDiagnostics.CreateScope("DevToolPortalResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _devToolPortalResourceDevToolPortalsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, devToolPortalName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new DevToolPortalResourceOperationSource(Client), _devToolPortalResourceDevToolPortalsClientDiagnostics, Pipeline, _devToolPortalResourceDevToolPortalsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, devToolPortalName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Application Live and its properties. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/DevToolPortals/{devToolPortalName} + /// + /// + /// Operation Id + /// DevToolPortals_Get + /// + /// + /// + /// The name of Dev Tool Portal. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string devToolPortalName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(devToolPortalName, nameof(devToolPortalName)); + + using var scope = _devToolPortalResourceDevToolPortalsClientDiagnostics.CreateScope("DevToolPortalResourceCollection.Get"); + scope.Start(); + try + { + var response = await _devToolPortalResourceDevToolPortalsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, devToolPortalName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevToolPortalResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Application Live and its properties. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/DevToolPortals/{devToolPortalName} + /// + /// + /// Operation Id + /// DevToolPortals_Get + /// + /// + /// + /// The name of Dev Tool Portal. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string devToolPortalName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(devToolPortalName, nameof(devToolPortalName)); + + using var scope = _devToolPortalResourceDevToolPortalsClientDiagnostics.CreateScope("DevToolPortalResourceCollection.Get"); + scope.Start(); + try + { + var response = _devToolPortalResourceDevToolPortalsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, devToolPortalName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DevToolPortalResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Handles requests to list all resources in a Service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/DevToolPortals + /// + /// + /// Operation Id + /// DevToolPortals_List + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _devToolPortalResourceDevToolPortalsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devToolPortalResourceDevToolPortalsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DevToolPortalResource(Client, DevToolPortalResourceData.DeserializeDevToolPortalResourceData(e)), _devToolPortalResourceDevToolPortalsClientDiagnostics, Pipeline, "DevToolPortalResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Handles requests to list all resources in a Service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/DevToolPortals + /// + /// + /// Operation Id + /// DevToolPortals_List + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _devToolPortalResourceDevToolPortalsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _devToolPortalResourceDevToolPortalsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DevToolPortalResource(Client, DevToolPortalResourceData.DeserializeDevToolPortalResourceData(e)), _devToolPortalResourceDevToolPortalsClientDiagnostics, Pipeline, "DevToolPortalResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/DevToolPortals/{devToolPortalName} + /// + /// + /// Operation Id + /// DevToolPortals_Get + /// + /// + /// + /// The name of Dev Tool Portal. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string devToolPortalName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(devToolPortalName, nameof(devToolPortalName)); + + using var scope = _devToolPortalResourceDevToolPortalsClientDiagnostics.CreateScope("DevToolPortalResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _devToolPortalResourceDevToolPortalsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, devToolPortalName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/DevToolPortals/{devToolPortalName} + /// + /// + /// Operation Id + /// DevToolPortals_Get + /// + /// + /// + /// The name of Dev Tool Portal. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string devToolPortalName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(devToolPortalName, nameof(devToolPortalName)); + + using var scope = _devToolPortalResourceDevToolPortalsClientDiagnostics.CreateScope("DevToolPortalResourceCollection.Exists"); + scope.Start(); + try + { + var response = _devToolPortalResourceDevToolPortalsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, devToolPortalName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DevToolPortalResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DevToolPortalResourceData.cs new file mode 100644 index 000000000000..f932732d9111 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DevToolPortalResourceData.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class representing the DevToolPortalResource data model. + public partial class DevToolPortalResourceData : ResourceData + { + /// Initializes a new instance of DevToolPortalResourceData. + public DevToolPortalResourceData() + { + } + + /// Initializes a new instance of DevToolPortalResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Dev Tool Portal properties payload. + internal DevToolPortalResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DevToolPortalProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// Dev Tool Portal properties payload. + public DevToolPortalProperties Properties { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/AppPlatformExtensions.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/AppPlatformExtensions.cs index f5a27a2a07f8..caea3cff78c6 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/AppPlatformExtensions.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/AppPlatformExtensions.cs @@ -354,6 +354,44 @@ public static AppPlatformServiceRegistryResource GetAppPlatformServiceRegistryRe } #endregion + #region ApplicationLiveViewResource + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static ApplicationLiveViewResource GetApplicationLiveViewResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + ApplicationLiveViewResource.ValidateResourceId(id); + return new ApplicationLiveViewResource(client, id); + } + ); + } + #endregion + + #region DevToolPortalResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static DevToolPortalResource GetDevToolPortalResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + DevToolPortalResource.ValidateResourceId(id); + return new DevToolPortalResource(client, id); + } + ); + } + #endregion + #region AppPlatformBuildServiceResource /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. @@ -733,5 +771,62 @@ public static AppPlatformApiPortalCustomDomainResource GetAppPlatformApiPortalCu ); } #endregion + + #region ApplicationAcceleratorResource + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static ApplicationAcceleratorResource GetApplicationAcceleratorResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + ApplicationAcceleratorResource.ValidateResourceId(id); + return new ApplicationAcceleratorResource(client, id); + } + ); + } + #endregion + + #region CustomizedAcceleratorResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static CustomizedAcceleratorResource GetCustomizedAcceleratorResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + CustomizedAcceleratorResource.ValidateResourceId(id); + return new CustomizedAcceleratorResource(client, id); + } + ); + } + #endregion + + #region PredefinedAcceleratorResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static PredefinedAcceleratorResource GetPredefinedAcceleratorResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + PredefinedAcceleratorResource.ValidateResourceId(id); + return new PredefinedAcceleratorResource(client, id); + } + ); + } + #endregion } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ApplicationAcceleratorResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ApplicationAcceleratorResourceOperationSource.cs new file mode 100644 index 000000000000..f88fb0fb1697 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ApplicationAcceleratorResourceOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.AppPlatform +{ + internal class ApplicationAcceleratorResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ApplicationAcceleratorResourceOperationSource(ArmClient client) + { + _client = client; + } + + ApplicationAcceleratorResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = ApplicationAcceleratorResourceData.DeserializeApplicationAcceleratorResourceData(document.RootElement); + return new ApplicationAcceleratorResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = ApplicationAcceleratorResourceData.DeserializeApplicationAcceleratorResourceData(document.RootElement); + return new ApplicationAcceleratorResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ApplicationLiveViewResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ApplicationLiveViewResourceOperationSource.cs new file mode 100644 index 000000000000..1eb978fd3ac7 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ApplicationLiveViewResourceOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.AppPlatform +{ + internal class ApplicationLiveViewResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ApplicationLiveViewResourceOperationSource(ArmClient client) + { + _client = client; + } + + ApplicationLiveViewResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = ApplicationLiveViewResourceData.DeserializeApplicationLiveViewResourceData(document.RootElement); + return new ApplicationLiveViewResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = ApplicationLiveViewResourceData.DeserializeApplicationLiveViewResourceData(document.RootElement); + return new ApplicationLiveViewResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/CustomizedAcceleratorResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/CustomizedAcceleratorResourceOperationSource.cs new file mode 100644 index 000000000000..b8e40f3424a9 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/CustomizedAcceleratorResourceOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.AppPlatform +{ + internal class CustomizedAcceleratorResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal CustomizedAcceleratorResourceOperationSource(ArmClient client) + { + _client = client; + } + + CustomizedAcceleratorResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = CustomizedAcceleratorResourceData.DeserializeCustomizedAcceleratorResourceData(document.RootElement); + return new CustomizedAcceleratorResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = CustomizedAcceleratorResourceData.DeserializeCustomizedAcceleratorResourceData(document.RootElement); + return new CustomizedAcceleratorResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/DevToolPortalResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/DevToolPortalResourceOperationSource.cs new file mode 100644 index 000000000000..6b18fa263f81 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/DevToolPortalResourceOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.AppPlatform +{ + internal class DevToolPortalResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DevToolPortalResourceOperationSource(ArmClient client) + { + _client = client; + } + + DevToolPortalResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = DevToolPortalResourceData.DeserializeDevToolPortalResourceData(document.RootElement); + return new DevToolPortalResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = DevToolPortalResourceData.DeserializeDevToolPortalResourceData(document.RootElement); + return new DevToolPortalResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorAuthSetting.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorAuthSetting.Serialization.cs new file mode 100644 index 000000000000..d0322824a9da --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorAuthSetting.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class AcceleratorAuthSetting : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("authType"u8); + writer.WriteStringValue(AuthType); + writer.WriteEndObject(); + } + + internal static AcceleratorAuthSetting DeserializeAcceleratorAuthSetting(JsonElement element) + { + if (element.TryGetProperty("authType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "BasicAuth": return AcceleratorBasicAuthSetting.DeserializeAcceleratorBasicAuthSetting(element); + case "Public": return AcceleratorPublicSetting.DeserializeAcceleratorPublicSetting(element); + case "SSH": return AcceleratorSshSetting.DeserializeAcceleratorSshSetting(element); + } + } + return UnknownAcceleratorAuthSetting.DeserializeUnknownAcceleratorAuthSetting(element); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorAuthSetting.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorAuthSetting.cs new file mode 100644 index 000000000000..1c657590d07d --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorAuthSetting.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// + /// Auth setting payload. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public abstract partial class AcceleratorAuthSetting + { + /// Initializes a new instance of AcceleratorAuthSetting. + protected AcceleratorAuthSetting() + { + } + + /// Initializes a new instance of AcceleratorAuthSetting. + /// The type of the auth setting. + internal AcceleratorAuthSetting(string authType) + { + AuthType = authType; + } + + /// The type of the auth setting. + internal string AuthType { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorBasicAuthSetting.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorBasicAuthSetting.Serialization.cs new file mode 100644 index 000000000000..40d20e6e7c56 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorBasicAuthSetting.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class AcceleratorBasicAuthSetting : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("username"u8); + writer.WriteStringValue(Username); + if (Optional.IsDefined(Password)) + { + writer.WritePropertyName("password"u8); + writer.WriteStringValue(Password); + } + writer.WritePropertyName("authType"u8); + writer.WriteStringValue(AuthType); + writer.WriteEndObject(); + } + + internal static AcceleratorBasicAuthSetting DeserializeAcceleratorBasicAuthSetting(JsonElement element) + { + string username = default; + Optional password = default; + string authType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("username"u8)) + { + username = property.Value.GetString(); + continue; + } + if (property.NameEquals("password"u8)) + { + password = property.Value.GetString(); + continue; + } + if (property.NameEquals("authType"u8)) + { + authType = property.Value.GetString(); + continue; + } + } + return new AcceleratorBasicAuthSetting(authType, username, password.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorBasicAuthSetting.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorBasicAuthSetting.cs new file mode 100644 index 000000000000..93acc0599678 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorBasicAuthSetting.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Auth setting for basic auth. + public partial class AcceleratorBasicAuthSetting : AcceleratorAuthSetting + { + /// Initializes a new instance of AcceleratorBasicAuthSetting. + /// Username of git repository basic auth. + /// is null. + public AcceleratorBasicAuthSetting(string username) + { + Argument.AssertNotNull(username, nameof(username)); + + Username = username; + AuthType = "BasicAuth"; + } + + /// Initializes a new instance of AcceleratorBasicAuthSetting. + /// The type of the auth setting. + /// Username of git repository basic auth. + /// Password of git repository basic auth. + internal AcceleratorBasicAuthSetting(string authType, string username, string password) : base(authType) + { + Username = username; + Password = password; + AuthType = authType ?? "BasicAuth"; + } + + /// Username of git repository basic auth. + public string Username { get; set; } + /// Password of git repository basic auth. + public string Password { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorGitRepository.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorGitRepository.Serialization.cs new file mode 100644 index 000000000000..09092e9f152f --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorGitRepository.Serialization.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class AcceleratorGitRepository : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Uri.AbsoluteUri); + if (Optional.IsDefined(IntervalInSeconds)) + { + writer.WritePropertyName("intervalInSeconds"u8); + writer.WriteNumberValue(IntervalInSeconds.Value); + } + if (Optional.IsDefined(Branch)) + { + writer.WritePropertyName("branch"u8); + writer.WriteStringValue(Branch); + } + if (Optional.IsDefined(Commit)) + { + writer.WritePropertyName("commit"u8); + writer.WriteStringValue(Commit); + } + if (Optional.IsDefined(GitTag)) + { + writer.WritePropertyName("gitTag"u8); + writer.WriteStringValue(GitTag); + } + writer.WritePropertyName("authSetting"u8); + writer.WriteObjectValue(AuthSetting); + writer.WriteEndObject(); + } + + internal static AcceleratorGitRepository DeserializeAcceleratorGitRepository(JsonElement element) + { + Uri uri = default; + Optional intervalInSeconds = default; + Optional branch = default; + Optional commit = default; + Optional gitTag = default; + AcceleratorAuthSetting authSetting = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("url"u8)) + { + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("intervalInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + intervalInSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("branch"u8)) + { + branch = property.Value.GetString(); + continue; + } + if (property.NameEquals("commit"u8)) + { + commit = property.Value.GetString(); + continue; + } + if (property.NameEquals("gitTag"u8)) + { + gitTag = property.Value.GetString(); + continue; + } + if (property.NameEquals("authSetting"u8)) + { + authSetting = AcceleratorAuthSetting.DeserializeAcceleratorAuthSetting(property.Value); + continue; + } + } + return new AcceleratorGitRepository(uri, Optional.ToNullable(intervalInSeconds), branch.Value, commit.Value, gitTag.Value, authSetting); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorGitRepository.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorGitRepository.cs new file mode 100644 index 000000000000..cb8fce9483b1 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorGitRepository.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// The AcceleratorGitRepository. + public partial class AcceleratorGitRepository + { + /// Initializes a new instance of AcceleratorGitRepository. + /// Git repository URL for the accelerator. + /// + /// Properties of the auth setting payload. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// or is null. + public AcceleratorGitRepository(Uri uri, AcceleratorAuthSetting authSetting) + { + Argument.AssertNotNull(uri, nameof(uri)); + Argument.AssertNotNull(authSetting, nameof(authSetting)); + + Uri = uri; + AuthSetting = authSetting; + } + + /// Initializes a new instance of AcceleratorGitRepository. + /// Git repository URL for the accelerator. + /// Interval for checking for updates to Git or image repository. + /// Git repository branch to be used. + /// Git repository commit to be used. + /// Git repository tag to be used. + /// + /// Properties of the auth setting payload. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + internal AcceleratorGitRepository(Uri uri, int? intervalInSeconds, string branch, string commit, string gitTag, AcceleratorAuthSetting authSetting) + { + Uri = uri; + IntervalInSeconds = intervalInSeconds; + Branch = branch; + Commit = commit; + GitTag = gitTag; + AuthSetting = authSetting; + } + + /// Git repository URL for the accelerator. + public Uri Uri { get; set; } + /// Interval for checking for updates to Git or image repository. + public int? IntervalInSeconds { get; set; } + /// Git repository branch to be used. + public string Branch { get; set; } + /// Git repository commit to be used. + public string Commit { get; set; } + /// Git repository tag to be used. + public string GitTag { get; set; } + /// + /// Properties of the auth setting payload. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public AcceleratorAuthSetting AuthSetting { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorPublicSetting.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorPublicSetting.Serialization.cs new file mode 100644 index 000000000000..d93c4093c1c8 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorPublicSetting.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class AcceleratorPublicSetting : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("authType"u8); + writer.WriteStringValue(AuthType); + writer.WriteEndObject(); + } + + internal static AcceleratorPublicSetting DeserializeAcceleratorPublicSetting(JsonElement element) + { + string authType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("authType"u8)) + { + authType = property.Value.GetString(); + continue; + } + } + return new AcceleratorPublicSetting(authType); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorPublicSetting.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorPublicSetting.cs new file mode 100644 index 000000000000..eb7e5ad6c429 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorPublicSetting.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Auth setting for public url. + public partial class AcceleratorPublicSetting : AcceleratorAuthSetting + { + /// Initializes a new instance of AcceleratorPublicSetting. + public AcceleratorPublicSetting() + { + AuthType = "Public"; + } + + /// Initializes a new instance of AcceleratorPublicSetting. + /// The type of the auth setting. + internal AcceleratorPublicSetting(string authType) : base(authType) + { + AuthType = authType ?? "Public"; + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorSshSetting.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorSshSetting.Serialization.cs new file mode 100644 index 000000000000..5fa9654f4c00 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorSshSetting.Serialization.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class AcceleratorSshSetting : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(HostKey)) + { + writer.WritePropertyName("hostKey"u8); + writer.WriteStringValue(HostKey); + } + if (Optional.IsDefined(HostKeyAlgorithm)) + { + writer.WritePropertyName("hostKeyAlgorithm"u8); + writer.WriteStringValue(HostKeyAlgorithm); + } + if (Optional.IsDefined(PrivateKey)) + { + writer.WritePropertyName("privateKey"u8); + writer.WriteStringValue(PrivateKey); + } + writer.WritePropertyName("authType"u8); + writer.WriteStringValue(AuthType); + writer.WriteEndObject(); + } + + internal static AcceleratorSshSetting DeserializeAcceleratorSshSetting(JsonElement element) + { + Optional hostKey = default; + Optional hostKeyAlgorithm = default; + Optional privateKey = default; + string authType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("hostKey"u8)) + { + hostKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostKeyAlgorithm"u8)) + { + hostKeyAlgorithm = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateKey"u8)) + { + privateKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("authType"u8)) + { + authType = property.Value.GetString(); + continue; + } + } + return new AcceleratorSshSetting(authType, hostKey.Value, hostKeyAlgorithm.Value, privateKey.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorSshSetting.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorSshSetting.cs new file mode 100644 index 000000000000..3fd09c25afe9 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorSshSetting.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Auth setting for SSH auth. + public partial class AcceleratorSshSetting : AcceleratorAuthSetting + { + /// Initializes a new instance of AcceleratorSshSetting. + public AcceleratorSshSetting() + { + AuthType = "SSH"; + } + + /// Initializes a new instance of AcceleratorSshSetting. + /// The type of the auth setting. + /// Public SSH Key of git repository. + /// SSH Key algorithm of git repository. + /// Private SSH Key algorithm of git repository. + internal AcceleratorSshSetting(string authType, string hostKey, string hostKeyAlgorithm, string privateKey) : base(authType) + { + HostKey = hostKey; + HostKeyAlgorithm = hostKeyAlgorithm; + PrivateKey = privateKey; + AuthType = authType ?? "SSH"; + } + + /// Public SSH Key of git repository. + public string HostKey { get; set; } + /// SSH Key algorithm of git repository. + public string HostKeyAlgorithm { get; set; } + /// Private SSH Key algorithm of git repository. + public string PrivateKey { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApmType.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApmType.cs new file mode 100644 index 000000000000..5d789ce0f15b --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApmType.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Type of application performance monitoring. + public readonly partial struct ApmType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ApmType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ApplicationInsightsValue = "ApplicationInsights"; + private const string AppDynamicsValue = "AppDynamics"; + private const string DynatraceValue = "Dynatrace"; + private const string NewRelicValue = "NewRelic"; + private const string ElasticApmValue = "ElasticAPM"; + + /// ApplicationInsights. + public static ApmType ApplicationInsights { get; } = new ApmType(ApplicationInsightsValue); + /// AppDynamics. + public static ApmType AppDynamics { get; } = new ApmType(AppDynamicsValue); + /// Dynatrace. + public static ApmType Dynatrace { get; } = new ApmType(DynatraceValue); + /// NewRelic. + public static ApmType NewRelic { get; } = new ApmType(NewRelicValue); + /// ElasticAPM. + public static ApmType ElasticApm { get; } = new ApmType(ElasticApmValue); + /// Determines if two values are the same. + public static bool operator ==(ApmType left, ApmType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ApmType left, ApmType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ApmType(string value) => new ApmType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ApmType other && Equals(other); + /// + public bool Equals(ApmType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppCustomPersistentDiskProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppCustomPersistentDiskProperties.Serialization.cs index 39ea49b81a05..0d5f14575de3 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppCustomPersistentDiskProperties.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppCustomPersistentDiskProperties.Serialization.cs @@ -24,6 +24,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("readOnly"u8); writer.WriteBooleanValue(IsReadOnly.Value); } + if (Optional.IsDefined(EnableSubPath)) + { + writer.WritePropertyName("enableSubPath"u8); + writer.WriteBooleanValue(EnableSubPath.Value); + } if (Optional.IsCollectionDefined(MountOptions)) { writer.WritePropertyName("mountOptions"u8); diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppCustomPersistentDiskProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppCustomPersistentDiskProperties.cs index fec6442cc584..662bcc92c5d4 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppCustomPersistentDiskProperties.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppCustomPersistentDiskProperties.cs @@ -33,12 +33,14 @@ protected AppCustomPersistentDiskProperties(string mountPath) /// The type of the underlying resource to mount as a persistent disk. /// The mount path of the persistent disk. /// Indicates whether the persistent disk is a readOnly one. + /// If set to true, it will create and mount a dedicated directory for every individual app instance. /// These are the mount options for a persistent disk. - internal AppCustomPersistentDiskProperties(UnderlyingResourceType underlyingResourceType, string mountPath, bool? isReadOnly, IList mountOptions) + internal AppCustomPersistentDiskProperties(UnderlyingResourceType underlyingResourceType, string mountPath, bool? isReadOnly, bool? enableSubPath, IList mountOptions) { UnderlyingResourceType = underlyingResourceType; MountPath = mountPath; IsReadOnly = isReadOnly; + EnableSubPath = enableSubPath; MountOptions = mountOptions; } @@ -48,6 +50,8 @@ internal AppCustomPersistentDiskProperties(UnderlyingResourceType underlyingReso public string MountPath { get; set; } /// Indicates whether the persistent disk is a readOnly one. public bool? IsReadOnly { get; set; } + /// If set to true, it will create and mount a dedicated directory for every individual app instance. + public bool? EnableSubPath { get; set; } /// These are the mount options for a persistent disk. public IList MountOptions { get; } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformAppProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformAppProperties.Serialization.cs index a6f8a81e92d5..8ea7b92b7131 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformAppProperties.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformAppProperties.Serialization.cs @@ -29,17 +29,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) foreach (var item in AddonConfigs) { writer.WritePropertyName(item.Key); - writer.WriteStartObject(); - foreach (var item0 in item.Value) - { - writer.WritePropertyName(item0.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item0.Value); + writer.WriteRawValue(item.Value); #else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item0.Value.ToString()).RootElement); + JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); #endif - } - writer.WriteEndObject(); } writer.WriteEndObject(); } @@ -93,6 +87,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("ingressSettings"u8); writer.WriteObjectValue(IngressSettings); } + if (Optional.IsCollectionDefined(Secrets)) + { + writer.WritePropertyName("secrets"u8); + writer.WriteStartArray(); + foreach (var item in Secrets) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } writer.WriteEndObject(); } @@ -100,7 +104,7 @@ internal static AppPlatformAppProperties DeserializeAppPlatformAppProperties(Jso { Optional @public = default; Optional uri = default; - Optional>> addonConfigs = default; + Optional> addonConfigs = default; Optional provisioningState = default; Optional fqdn = default; Optional httpsOnly = default; @@ -111,6 +115,7 @@ internal static AppPlatformAppProperties DeserializeAppPlatformAppProperties(Jso Optional> loadedCertificates = default; Optional vnetAddons = default; Optional ingressSettings = default; + Optional> secrets = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("public"u8)) @@ -140,15 +145,10 @@ internal static AppPlatformAppProperties DeserializeAppPlatformAppProperties(Jso property.ThrowNonNullablePropertyIsNull(); continue; } - Dictionary> dictionary = new Dictionary>(); + Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { - Dictionary dictionary0 = new Dictionary(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - dictionary0.Add(property1.Name, BinaryData.FromString(property1.Value.GetRawText())); - } - dictionary.Add(property0.Name, dictionary0); + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); } addonConfigs = dictionary; continue; @@ -258,8 +258,23 @@ internal static AppPlatformAppProperties DeserializeAppPlatformAppProperties(Jso ingressSettings = AppIngressSettings.DeserializeAppIngressSettings(property.Value); continue; } + if (property.NameEquals("secrets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Secret.DeserializeSecret(item)); + } + secrets = array; + continue; + } } - return new AppPlatformAppProperties(Optional.ToNullable(@public), uri.Value, Optional.ToDictionary(addonConfigs), Optional.ToNullable(provisioningState), fqdn.Value, Optional.ToNullable(httpsOnly), temporaryDisk.Value, persistentDisk.Value, Optional.ToList(customPersistentDisks), Optional.ToNullable(enableEndToEndTls), Optional.ToList(loadedCertificates), vnetAddons.Value, ingressSettings.Value); + return new AppPlatformAppProperties(Optional.ToNullable(@public), uri.Value, Optional.ToDictionary(addonConfigs), Optional.ToNullable(provisioningState), fqdn.Value, Optional.ToNullable(httpsOnly), temporaryDisk.Value, persistentDisk.Value, Optional.ToList(customPersistentDisks), Optional.ToNullable(enableEndToEndTls), Optional.ToList(loadedCertificates), vnetAddons.Value, ingressSettings.Value, Optional.ToList(secrets)); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformAppProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformAppProperties.cs index 59e11b8409cb..0cc898b2e1a3 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformAppProperties.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformAppProperties.cs @@ -17,9 +17,10 @@ public partial class AppPlatformAppProperties /// Initializes a new instance of AppPlatformAppProperties. public AppPlatformAppProperties() { - AddonConfigs = new ChangeTrackingDictionary>(); + AddonConfigs = new ChangeTrackingDictionary(); CustomPersistentDisks = new ChangeTrackingList(); LoadedCertificates = new ChangeTrackingList(); + Secrets = new ChangeTrackingList(); } /// Initializes a new instance of AppPlatformAppProperties. @@ -36,7 +37,8 @@ public AppPlatformAppProperties() /// Collection of loaded certificates. /// Additional App settings in vnet injection instance. /// App ingress settings payload. - internal AppPlatformAppProperties(bool? isPublic, Uri uri, IDictionary> addonConfigs, AppPlatformAppProvisioningState? provisioningState, string fqdn, bool? isHttpsOnly, AppTemporaryDisk temporaryDisk, AppPersistentDisk persistentDisk, IList customPersistentDisks, bool? isEndToEndTlsEnabled, IList loadedCertificates, AppVnetAddons vnetAddons, AppIngressSettings ingressSettings) + /// Collection of auth secrets. + internal AppPlatformAppProperties(bool? isPublic, Uri uri, IDictionary addonConfigs, AppPlatformAppProvisioningState? provisioningState, string fqdn, bool? isHttpsOnly, AppTemporaryDisk temporaryDisk, AppPersistentDisk persistentDisk, IList customPersistentDisks, bool? isEndToEndTlsEnabled, IList loadedCertificates, AppVnetAddons vnetAddons, AppIngressSettings ingressSettings, IList secrets) { IsPublic = isPublic; Uri = uri; @@ -51,14 +53,44 @@ internal AppPlatformAppProperties(bool? isPublic, Uri uri, IDictionary Indicates whether the App exposes public endpoint. public bool? IsPublic { get; set; } /// URL of the App. public Uri Uri { get; } - /// Collection of addons. - public IDictionary> AddonConfigs { get; } + /// + /// Collection of addons + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formated json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IDictionary AddonConfigs { get; } /// Provisioning state of the App. public AppPlatformAppProvisioningState? ProvisioningState { get; } /// Fully qualified dns Name. @@ -79,5 +111,7 @@ internal AppPlatformAppProperties(bool? isPublic, Uri uri, IDictionary App ingress settings payload. public AppIngressSettings IngressSettings { get; set; } + /// Collection of auth secrets. + public IList Secrets { get; } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformAzureFileVolume.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformAzureFileVolume.Serialization.cs index 157b472b777f..0e48f08dd7e8 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformAzureFileVolume.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformAzureFileVolume.Serialization.cs @@ -16,8 +16,11 @@ public partial class AppPlatformAzureFileVolume : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - writer.WritePropertyName("shareName"u8); - writer.WriteStringValue(ShareName); + if (Optional.IsDefined(ShareName)) + { + writer.WritePropertyName("shareName"u8); + writer.WriteStringValue(ShareName); + } writer.WritePropertyName("type"u8); writer.WriteStringValue(UnderlyingResourceType.ToString()); writer.WritePropertyName("mountPath"u8); @@ -27,6 +30,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("readOnly"u8); writer.WriteBooleanValue(IsReadOnly.Value); } + if (Optional.IsDefined(EnableSubPath)) + { + writer.WritePropertyName("enableSubPath"u8); + writer.WriteBooleanValue(EnableSubPath.Value); + } if (Optional.IsCollectionDefined(MountOptions)) { writer.WritePropertyName("mountOptions"u8); @@ -42,10 +50,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) internal static AppPlatformAzureFileVolume DeserializeAppPlatformAzureFileVolume(JsonElement element) { - string shareName = default; + Optional shareName = default; UnderlyingResourceType type = default; string mountPath = default; Optional readOnly = default; + Optional enableSubPath = default; Optional> mountOptions = default; foreach (var property in element.EnumerateObject()) { @@ -74,6 +83,16 @@ internal static AppPlatformAzureFileVolume DeserializeAppPlatformAzureFileVolume readOnly = property.Value.GetBoolean(); continue; } + if (property.NameEquals("enableSubPath"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + enableSubPath = property.Value.GetBoolean(); + continue; + } if (property.NameEquals("mountOptions"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -90,7 +109,7 @@ internal static AppPlatformAzureFileVolume DeserializeAppPlatformAzureFileVolume continue; } } - return new AppPlatformAzureFileVolume(type, mountPath, Optional.ToNullable(readOnly), Optional.ToList(mountOptions), shareName); + return new AppPlatformAzureFileVolume(type, mountPath, Optional.ToNullable(readOnly), Optional.ToNullable(enableSubPath), Optional.ToList(mountOptions), shareName.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformAzureFileVolume.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformAzureFileVolume.cs index 09c545c9ec90..bc36a072cdd4 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformAzureFileVolume.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformAzureFileVolume.cs @@ -16,14 +16,11 @@ public partial class AppPlatformAzureFileVolume : AppCustomPersistentDiskPropert { /// Initializes a new instance of AppPlatformAzureFileVolume. /// The mount path of the persistent disk. - /// The share name of the Azure File share. - /// or is null. - public AppPlatformAzureFileVolume(string mountPath, string shareName) : base(mountPath) + /// is null. + public AppPlatformAzureFileVolume(string mountPath) : base(mountPath) { Argument.AssertNotNull(mountPath, nameof(mountPath)); - Argument.AssertNotNull(shareName, nameof(shareName)); - ShareName = shareName; UnderlyingResourceType = UnderlyingResourceType.AzureFileVolume; } @@ -31,9 +28,10 @@ public AppPlatformAzureFileVolume(string mountPath, string shareName) : base(mou /// The type of the underlying resource to mount as a persistent disk. /// The mount path of the persistent disk. /// Indicates whether the persistent disk is a readOnly one. + /// If set to true, it will create and mount a dedicated directory for every individual app instance. /// These are the mount options for a persistent disk. /// The share name of the Azure File share. - internal AppPlatformAzureFileVolume(UnderlyingResourceType underlyingResourceType, string mountPath, bool? isReadOnly, IList mountOptions, string shareName) : base(underlyingResourceType, mountPath, isReadOnly, mountOptions) + internal AppPlatformAzureFileVolume(UnderlyingResourceType underlyingResourceType, string mountPath, bool? isReadOnly, bool? enableSubPath, IList mountOptions, string shareName) : base(underlyingResourceType, mountPath, isReadOnly, enableSubPath, mountOptions) { ShareName = shareName; UnderlyingResourceType = underlyingResourceType; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBindingProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBindingProperties.Serialization.cs index 9ec4c924894f..5faa0b76e903 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBindingProperties.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBindingProperties.Serialization.cs @@ -34,11 +34,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) foreach (var item in BindingParameters) { writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif + writer.WriteStringValue(item.Value); } writer.WriteEndObject(); } @@ -51,7 +47,7 @@ internal static AppPlatformBindingProperties DeserializeAppPlatformBindingProper Optional resourceType = default; Optional resourceId = default; Optional key = default; - Optional> bindingParameters = default; + Optional> bindingParameters = default; Optional generatedProperties = default; Optional createdAt = default; Optional updatedAt = default; @@ -89,10 +85,10 @@ internal static AppPlatformBindingProperties DeserializeAppPlatformBindingProper property.ThrowNonNullablePropertyIsNull(); continue; } - Dictionary dictionary = new Dictionary(); + Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { - dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + dictionary.Add(property0.Name, property0.Value.GetString()); } bindingParameters = dictionary; continue; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBindingProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBindingProperties.cs index 53620644d371..0b8b26d0047e 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBindingProperties.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBindingProperties.cs @@ -17,7 +17,7 @@ public partial class AppPlatformBindingProperties /// Initializes a new instance of AppPlatformBindingProperties. public AppPlatformBindingProperties() { - BindingParameters = new ChangeTrackingDictionary(); + BindingParameters = new ChangeTrackingDictionary(); } /// Initializes a new instance of AppPlatformBindingProperties. @@ -29,7 +29,7 @@ public AppPlatformBindingProperties() /// The generated Spring Boot property file for this binding. The secret will be deducted. /// Creation time of the Binding resource. /// Update time of the Binding resource. - internal AppPlatformBindingProperties(string resourceName, string resourceType, ResourceIdentifier resourceId, string key, IDictionary bindingParameters, string generatedProperties, DateTimeOffset? createdOn, DateTimeOffset? updatedOn) + internal AppPlatformBindingProperties(string resourceName, string resourceType, ResourceIdentifier resourceId, string key, IDictionary bindingParameters, string generatedProperties, DateTimeOffset? createdOn, DateTimeOffset? updatedOn) { ResourceName = resourceName; ResourceType = resourceType; @@ -49,37 +49,8 @@ internal AppPlatformBindingProperties(string resourceName, string resourceType, public ResourceIdentifier ResourceId { get; set; } /// The key of the bound resource. public string Key { get; set; } - /// - /// Binding parameters of the Binding resource - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public IDictionary BindingParameters { get; } + /// Binding parameters of the Binding resource. + public IDictionary BindingParameters { get; } /// The generated Spring Boot property file for this binding. The secret will be deducted. public string GeneratedProperties { get; } /// Creation time of the Binding resource. diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildResultProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildResultProperties.Serialization.cs index 467707441bb9..ff842793c730 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildResultProperties.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildResultProperties.Serialization.cs @@ -21,6 +21,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error); + } if (Optional.IsDefined(BuildPodName)) { writer.WritePropertyName("buildPodName"u8); @@ -33,6 +38,7 @@ internal static AppPlatformBuildResultProperties DeserializeAppPlatformBuildResu { Optional name = default; Optional provisioningState = default; + Optional error = default; Optional buildPodName = default; Optional> buildStages = default; foreach (var property in element.EnumerateObject()) @@ -52,6 +58,16 @@ internal static AppPlatformBuildResultProperties DeserializeAppPlatformBuildResu provisioningState = new AppPlatformBuildResultProvisioningState(property.Value.GetString()); continue; } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + error = AppPlatformErrorInfo.DeserializeAppPlatformErrorInfo(property.Value); + continue; + } if (property.NameEquals("buildPodName"u8)) { buildPodName = property.Value.GetString(); @@ -73,7 +89,7 @@ internal static AppPlatformBuildResultProperties DeserializeAppPlatformBuildResu continue; } } - return new AppPlatformBuildResultProperties(name.Value, Optional.ToNullable(provisioningState), buildPodName.Value, Optional.ToList(buildStages)); + return new AppPlatformBuildResultProperties(name.Value, Optional.ToNullable(provisioningState), error.Value, buildPodName.Value, Optional.ToList(buildStages)); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildResultProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildResultProperties.cs index 9fa0a0bdfeec..e6d696204a53 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildResultProperties.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildResultProperties.cs @@ -22,12 +22,14 @@ public AppPlatformBuildResultProperties() /// Initializes a new instance of AppPlatformBuildResultProperties. /// The name of this build result. /// Provisioning state of the KPack build result. + /// Error when build is failed. /// The build pod name which can be used to get the build log streaming. /// All of the build stage (init-container and container) resources in build pod. - internal AppPlatformBuildResultProperties(string name, AppPlatformBuildResultProvisioningState? provisioningState, string buildPodName, IReadOnlyList buildStages) + internal AppPlatformBuildResultProperties(string name, AppPlatformBuildResultProvisioningState? provisioningState, AppPlatformErrorInfo error, string buildPodName, IReadOnlyList buildStages) { Name = name; ProvisioningState = provisioningState; + Error = error; BuildPodName = buildPodName; BuildStages = buildStages; } @@ -36,6 +38,8 @@ internal AppPlatformBuildResultProperties(string name, AppPlatformBuildResultPro public string Name { get; set; } /// Provisioning state of the KPack build result. public AppPlatformBuildResultProvisioningState? ProvisioningState { get; } + /// Error when build is failed. + public AppPlatformErrorInfo Error { get; set; } /// The build pod name which can be used to get the build log streaming. public string BuildPodName { get; set; } /// All of the build stage (init-container and container) resources in build pod. diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildStageProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildStageProperties.Serialization.cs index 28f768baba21..6efe33ba78b8 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildStageProperties.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildStageProperties.Serialization.cs @@ -16,6 +16,8 @@ internal static AppPlatformBuildStageProperties DeserializeAppPlatformBuildStage { Optional name = default; Optional status = default; + Optional exitCode = default; + Optional reason = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name"u8)) @@ -33,8 +35,18 @@ internal static AppPlatformBuildStageProperties DeserializeAppPlatformBuildStage status = new KPackBuildStageProvisioningState(property.Value.GetString()); continue; } + if (property.NameEquals("exitCode"u8)) + { + exitCode = property.Value.GetString(); + continue; + } + if (property.NameEquals("reason"u8)) + { + reason = property.Value.GetString(); + continue; + } } - return new AppPlatformBuildStageProperties(name.Value, Optional.ToNullable(status)); + return new AppPlatformBuildStageProperties(name.Value, Optional.ToNullable(status), exitCode.Value, reason.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildStageProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildStageProperties.cs index 5ae34c835e41..776326d08fe3 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildStageProperties.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildStageProperties.cs @@ -18,15 +18,23 @@ internal AppPlatformBuildStageProperties() /// Initializes a new instance of AppPlatformBuildStageProperties. /// The name of this build stage resource. /// The provisioning state of this build stage resource. - internal AppPlatformBuildStageProperties(string name, KPackBuildStageProvisioningState? status) + /// The exit code of this build init container. + /// The reason of this build init container. + internal AppPlatformBuildStageProperties(string name, KPackBuildStageProvisioningState? status, string exitCode, string reason) { Name = name; Status = status; + ExitCode = exitCode; + Reason = reason; } /// The name of this build stage resource. public string Name { get; } /// The provisioning state of this build stage resource. public KPackBuildStageProvisioningState? Status { get; } + /// The exit code of this build init container. + public string ExitCode { get; } + /// The reason of this build init container. + public string Reason { get; } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformDeploymentSettings.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformDeploymentSettings.Serialization.cs index 4c4b325cebd8..ec99657a7db7 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformDeploymentSettings.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformDeploymentSettings.Serialization.cs @@ -40,17 +40,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) foreach (var item in AddonConfigs) { writer.WritePropertyName(item.Key); - writer.WriteStartObject(); - foreach (var item0 in item.Value) - { - writer.WritePropertyName(item0.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item0.Value); + writer.WriteRawValue(item.Value); #else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item0.Value.ToString()).RootElement); + JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); #endif - } - writer.WriteEndObject(); } writer.WriteEndObject(); } @@ -74,6 +68,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("terminationGracePeriodSeconds"u8); writer.WriteNumberValue(TerminationGracePeriodInSeconds.Value); } + if (Optional.IsDefined(Scale)) + { + writer.WritePropertyName("scale"u8); + writer.WriteObjectValue(Scale); + } if (Optional.IsDefined(ContainerProbeSettings)) { writer.WritePropertyName("containerProbeSettings"u8); @@ -86,11 +85,12 @@ internal static AppPlatformDeploymentSettings DeserializeAppPlatformDeploymentSe { Optional resourceRequests = default; Optional> environmentVariables = default; - Optional>> addonConfigs = default; + Optional> addonConfigs = default; Optional livenessProbe = default; Optional readinessProbe = default; Optional startupProbe = default; Optional terminationGracePeriodSeconds = default; + Optional scale = default; Optional containerProbeSettings = default; foreach (var property in element.EnumerateObject()) { @@ -126,15 +126,10 @@ internal static AppPlatformDeploymentSettings DeserializeAppPlatformDeploymentSe property.ThrowNonNullablePropertyIsNull(); continue; } - Dictionary> dictionary = new Dictionary>(); + Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { - Dictionary dictionary0 = new Dictionary(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - dictionary0.Add(property1.Name, BinaryData.FromString(property1.Value.GetRawText())); - } - dictionary.Add(property0.Name, dictionary0); + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); } addonConfigs = dictionary; continue; @@ -179,6 +174,16 @@ internal static AppPlatformDeploymentSettings DeserializeAppPlatformDeploymentSe terminationGracePeriodSeconds = property.Value.GetInt32(); continue; } + if (property.NameEquals("scale"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + scale = Scale.DeserializeScale(property.Value); + continue; + } if (property.NameEquals("containerProbeSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -190,7 +195,7 @@ internal static AppPlatformDeploymentSettings DeserializeAppPlatformDeploymentSe continue; } } - return new AppPlatformDeploymentSettings(resourceRequests.Value, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(addonConfigs), livenessProbe.Value, readinessProbe.Value, startupProbe.Value, Optional.ToNullable(terminationGracePeriodSeconds), containerProbeSettings.Value); + return new AppPlatformDeploymentSettings(resourceRequests.Value, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(addonConfigs), livenessProbe.Value, readinessProbe.Value, startupProbe.Value, Optional.ToNullable(terminationGracePeriodSeconds), scale.Value, containerProbeSettings.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformDeploymentSettings.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformDeploymentSettings.cs index bf25fe3aae4b..d2a2bca562e7 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformDeploymentSettings.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformDeploymentSettings.cs @@ -18,7 +18,7 @@ public partial class AppPlatformDeploymentSettings public AppPlatformDeploymentSettings() { EnvironmentVariables = new ChangeTrackingDictionary(); - AddonConfigs = new ChangeTrackingDictionary>(); + AddonConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of AppPlatformDeploymentSettings. @@ -29,8 +29,9 @@ public AppPlatformDeploymentSettings() /// Periodic probe of App Instance service readiness. App Instance will be removed from service endpoints if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes. /// StartupProbe indicates that the App Instance has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a App Instance's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes. /// Optional duration in seconds the App Instance needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the App Instance are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 90 seconds. + /// Scaling properties for the Azure Spring Apps App Instance. /// Container liveness and readiness probe settings. - internal AppPlatformDeploymentSettings(AppPlatformDeploymentResourceRequirements resourceRequests, IDictionary environmentVariables, IDictionary> addonConfigs, AppInstanceProbe livenessProbe, AppInstanceProbe readinessProbe, AppInstanceProbe startupProbe, int? terminationGracePeriodInSeconds, ContainerProbeSettings containerProbeSettings) + internal AppPlatformDeploymentSettings(AppPlatformDeploymentResourceRequirements resourceRequests, IDictionary environmentVariables, IDictionary addonConfigs, AppInstanceProbe livenessProbe, AppInstanceProbe readinessProbe, AppInstanceProbe startupProbe, int? terminationGracePeriodInSeconds, Scale scale, ContainerProbeSettings containerProbeSettings) { ResourceRequests = resourceRequests; EnvironmentVariables = environmentVariables; @@ -39,6 +40,7 @@ internal AppPlatformDeploymentSettings(AppPlatformDeploymentResourceRequirements ReadinessProbe = readinessProbe; StartupProbe = startupProbe; TerminationGracePeriodInSeconds = terminationGracePeriodInSeconds; + Scale = scale; ContainerProbeSettings = containerProbeSettings; } @@ -46,8 +48,37 @@ internal AppPlatformDeploymentSettings(AppPlatformDeploymentResourceRequirements public AppPlatformDeploymentResourceRequirements ResourceRequests { get; set; } /// Collection of environment variables. public IDictionary EnvironmentVariables { get; } - /// Collection of addons. - public IDictionary> AddonConfigs { get; } + /// + /// Collection of addons + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formated json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IDictionary AddonConfigs { get; } /// Periodic probe of App Instance liveness. App Instance will be restarted if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes. public AppInstanceProbe LivenessProbe { get; set; } /// Periodic probe of App Instance service readiness. App Instance will be removed from service endpoints if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes. @@ -56,6 +87,8 @@ internal AppPlatformDeploymentSettings(AppPlatformDeploymentResourceRequirements public AppInstanceProbe StartupProbe { get; set; } /// Optional duration in seconds the App Instance needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the App Instance are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 90 seconds. public int? TerminationGracePeriodInSeconds { get; set; } + /// Scaling properties for the Azure Spring Apps App Instance. + public Scale Scale { get; set; } /// Container liveness and readiness probe settings. internal ContainerProbeSettings ContainerProbeSettings { get; set; } /// Indicates whether disable the liveness and readiness probe. diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformGatewayPatch.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformGatewayPatch.Serialization.cs new file mode 100644 index 000000000000..210a0f027bf1 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformGatewayPatch.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class AppPlatformGatewayPatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformGatewayPatch.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformGatewayPatch.cs new file mode 100644 index 000000000000..4a65add6bfd5 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformGatewayPatch.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Resource Sku object used for scaling out and scaling in. + public partial class AppPlatformGatewayPatch + { + /// Initializes a new instance of AppPlatformGatewayPatch. + public AppPlatformGatewayPatch() + { + } + + /// Sku of the Spring Cloud Gateway resource. + public AppPlatformSku Sku { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformGatewayProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformGatewayProperties.Serialization.cs index 9bfc72f58458..89dd511e89bc 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformGatewayProperties.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformGatewayProperties.Serialization.cs @@ -42,6 +42,21 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("corsProperties"u8); writer.WriteObjectValue(CorsProperties); } + if (Optional.IsCollectionDefined(ApmTypes)) + { + writer.WritePropertyName("apmTypes"u8); + writer.WriteStartArray(); + foreach (var item in ApmTypes) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(EnvironmentVariables)) + { + writer.WritePropertyName("environmentVariables"u8); + writer.WriteObjectValue(EnvironmentVariables); + } if (Optional.IsDefined(ResourceRequests)) { writer.WritePropertyName("resourceRequests"u8); @@ -59,6 +74,8 @@ internal static AppPlatformGatewayProperties DeserializeAppPlatformGatewayProper Optional ssoProperties = default; Optional apiMetadataProperties = default; Optional corsProperties = default; + Optional> apmTypes = default; + Optional environmentVariables = default; Optional resourceRequests = default; Optional> instances = default; Optional operatorProperties = default; @@ -134,6 +151,31 @@ internal static AppPlatformGatewayProperties DeserializeAppPlatformGatewayProper corsProperties = AppPlatformGatewayCorsProperties.DeserializeAppPlatformGatewayCorsProperties(property.Value); continue; } + if (property.NameEquals("apmTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new ApmType(item.GetString())); + } + apmTypes = array; + continue; + } + if (property.NameEquals("environmentVariables"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + environmentVariables = GatewayPropertiesEnvironmentVariables.DeserializeGatewayPropertiesEnvironmentVariables(property.Value); + continue; + } if (property.NameEquals("resourceRequests"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -170,7 +212,7 @@ internal static AppPlatformGatewayProperties DeserializeAppPlatformGatewayProper continue; } } - return new AppPlatformGatewayProperties(Optional.ToNullable(provisioningState), Optional.ToNullable(@public), uri.Value, Optional.ToNullable(httpsOnly), ssoProperties.Value, apiMetadataProperties.Value, corsProperties.Value, resourceRequests.Value, Optional.ToList(instances), operatorProperties.Value); + return new AppPlatformGatewayProperties(Optional.ToNullable(provisioningState), Optional.ToNullable(@public), uri.Value, Optional.ToNullable(httpsOnly), ssoProperties.Value, apiMetadataProperties.Value, corsProperties.Value, Optional.ToList(apmTypes), environmentVariables.Value, resourceRequests.Value, Optional.ToList(instances), operatorProperties.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformGatewayProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformGatewayProperties.cs index 09c39f097fdc..9e86f1f58291 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformGatewayProperties.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformGatewayProperties.cs @@ -17,6 +17,7 @@ public partial class AppPlatformGatewayProperties /// Initializes a new instance of AppPlatformGatewayProperties. public AppPlatformGatewayProperties() { + ApmTypes = new ChangeTrackingList(); Instances = new ChangeTrackingList(); } @@ -28,10 +29,12 @@ public AppPlatformGatewayProperties() /// Single sign-on related configuration. /// API metadata property for Spring Cloud Gateway. /// Cross-Origin Resource Sharing property. + /// Collection of APM type used in Spring Cloud Gateway. + /// Environment variables of Spring Cloud Gateway. /// The requested resource quantity for required CPU and Memory. /// Collection of instances belong to Spring Cloud Gateway. /// Properties of the Spring Cloud Gateway Operator. - internal AppPlatformGatewayProperties(AppPlatformGatewayProvisioningState? provisioningState, bool? isPublic, Uri uri, bool? isHttpsOnly, AppPlatformSsoProperties ssoProperties, AppPlatformGatewayApiMetadataProperties apiMetadataProperties, AppPlatformGatewayCorsProperties corsProperties, AppPlatformGatewayResourceRequirements resourceRequests, IReadOnlyList instances, AppPlatformGatewayOperatorProperties operatorProperties) + internal AppPlatformGatewayProperties(AppPlatformGatewayProvisioningState? provisioningState, bool? isPublic, Uri uri, bool? isHttpsOnly, AppPlatformSsoProperties ssoProperties, AppPlatformGatewayApiMetadataProperties apiMetadataProperties, AppPlatformGatewayCorsProperties corsProperties, IList apmTypes, GatewayPropertiesEnvironmentVariables environmentVariables, AppPlatformGatewayResourceRequirements resourceRequests, IReadOnlyList instances, AppPlatformGatewayOperatorProperties operatorProperties) { ProvisioningState = provisioningState; IsPublic = isPublic; @@ -40,6 +43,8 @@ internal AppPlatformGatewayProperties(AppPlatformGatewayProvisioningState? provi SsoProperties = ssoProperties; ApiMetadataProperties = apiMetadataProperties; CorsProperties = corsProperties; + ApmTypes = apmTypes; + EnvironmentVariables = environmentVariables; ResourceRequests = resourceRequests; Instances = instances; OperatorProperties = operatorProperties; @@ -59,6 +64,10 @@ internal AppPlatformGatewayProperties(AppPlatformGatewayProvisioningState? provi public AppPlatformGatewayApiMetadataProperties ApiMetadataProperties { get; set; } /// Cross-Origin Resource Sharing property. public AppPlatformGatewayCorsProperties CorsProperties { get; set; } + /// Collection of APM type used in Spring Cloud Gateway. + public IList ApmTypes { get; } + /// Environment variables of Spring Cloud Gateway. + public GatewayPropertiesEnvironmentVariables EnvironmentVariables { get; set; } /// The requested resource quantity for required CPU and Memory. public AppPlatformGatewayResourceRequirements ResourceRequests { get; set; } /// Collection of instances belong to Spring Cloud Gateway. diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformGatewayRouteConfigProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformGatewayRouteConfigProperties.Serialization.cs index 2ffeee251153..32d01e718c50 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformGatewayRouteConfigProperties.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformGatewayRouteConfigProperties.Serialization.cs @@ -41,6 +41,31 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndArray(); } + if (Optional.IsDefined(SsoEnabled)) + { + writer.WritePropertyName("ssoEnabled"u8); + writer.WriteBooleanValue(SsoEnabled.Value); + } + if (Optional.IsCollectionDefined(Predicates)) + { + writer.WritePropertyName("predicates"u8); + writer.WriteStartArray(); + foreach (var item in Predicates) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Filters)) + { + writer.WritePropertyName("filters"u8); + writer.WriteStartArray(); + foreach (var item in Filters) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } writer.WriteEndObject(); } @@ -51,6 +76,9 @@ internal static AppPlatformGatewayRouteConfigProperties DeserializeAppPlatformGa Optional openApi = default; Optional protocol = default; Optional> routes = default; + Optional ssoEnabled = default; + Optional> predicates = default; + Optional> filters = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("provisioningState"u8)) @@ -108,8 +136,48 @@ internal static AppPlatformGatewayRouteConfigProperties DeserializeAppPlatformGa routes = array; continue; } + if (property.NameEquals("ssoEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + ssoEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("predicates"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + predicates = array; + continue; + } + if (property.NameEquals("filters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + filters = array; + continue; + } } - return new AppPlatformGatewayRouteConfigProperties(Optional.ToNullable(provisioningState), appResourceId.Value, openApi.Value, Optional.ToNullable(protocol), Optional.ToList(routes)); + return new AppPlatformGatewayRouteConfigProperties(Optional.ToNullable(provisioningState), appResourceId.Value, openApi.Value, Optional.ToNullable(protocol), Optional.ToList(routes), Optional.ToNullable(ssoEnabled), Optional.ToList(predicates), Optional.ToList(filters)); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformGatewayRouteConfigProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformGatewayRouteConfigProperties.cs index c1b72df3d211..d2f4687c1447 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformGatewayRouteConfigProperties.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformGatewayRouteConfigProperties.cs @@ -18,6 +18,8 @@ public partial class AppPlatformGatewayRouteConfigProperties public AppPlatformGatewayRouteConfigProperties() { Routes = new ChangeTrackingList(); + Predicates = new ChangeTrackingList(); + Filters = new ChangeTrackingList(); } /// Initializes a new instance of AppPlatformGatewayRouteConfigProperties. @@ -26,13 +28,19 @@ public AppPlatformGatewayRouteConfigProperties() /// OpenAPI properties of Spring Cloud Gateway route config. /// Protocol of routed Azure Spring Apps applications. /// Array of API routes, each route contains properties such as `title`, `uri`, `ssoEnabled`, `predicates`, `filters`. - internal AppPlatformGatewayRouteConfigProperties(AppPlatformGatewayProvisioningState? provisioningState, ResourceIdentifier appResourceId, GatewayRouteConfigOpenApiProperties openApi, AppPlatformGatewayRouteConfigProtocol? protocol, IList routes) + /// Enable Single Sign-On in app level. + /// A number of conditions to evaluate a route for each request in app level. Each predicate may be evaluated against request headers and parameter values. All of the predicates associated with a route must evaluate to true for the route to be matched to the request. + /// To modify the request before sending it to the target endpoint, or the received response in app level. + internal AppPlatformGatewayRouteConfigProperties(AppPlatformGatewayProvisioningState? provisioningState, ResourceIdentifier appResourceId, GatewayRouteConfigOpenApiProperties openApi, AppPlatformGatewayRouteConfigProtocol? protocol, IList routes, bool? ssoEnabled, IList predicates, IList filters) { ProvisioningState = provisioningState; AppResourceId = appResourceId; OpenApi = openApi; Protocol = protocol; Routes = routes; + SsoEnabled = ssoEnabled; + Predicates = predicates; + Filters = filters; } /// State of the Spring Cloud Gateway route config. @@ -57,5 +65,11 @@ public Uri OpenApiUri public AppPlatformGatewayRouteConfigProtocol? Protocol { get; set; } /// Array of API routes, each route contains properties such as `title`, `uri`, `ssoEnabled`, `predicates`, `filters`. public IList Routes { get; } + /// Enable Single Sign-On in app level. + public bool? SsoEnabled { get; set; } + /// A number of conditions to evaluate a route for each request in app level. Each predicate may be evaluated against request headers and parameter values. All of the predicates associated with a route must evaluate to true for the route to be matched to the request. + public IList Predicates { get; } + /// To modify the request before sending it to the target endpoint, or the received response in app level. + public IList Filters { get; } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformServiceProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformServiceProperties.Serialization.cs index 8ad5eb626be3..0c360b51776f 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformServiceProperties.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformServiceProperties.Serialization.cs @@ -26,11 +26,26 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("vnetAddons"u8); writer.WriteObjectValue(VnetAddons); } + if (Optional.IsDefined(ManagedEnvironmentId)) + { + writer.WritePropertyName("managedEnvironmentId"u8); + writer.WriteStringValue(ManagedEnvironmentId); + } + if (Optional.IsDefined(InfraResourceGroup)) + { + writer.WritePropertyName("infraResourceGroup"u8); + writer.WriteStringValue(InfraResourceGroup); + } if (Optional.IsDefined(IsZoneRedundant)) { writer.WritePropertyName("zoneRedundant"u8); writer.WriteBooleanValue(IsZoneRedundant.Value); } + if (Optional.IsDefined(MarketplaceResource)) + { + writer.WritePropertyName("marketplaceResource"u8); + writer.WriteObjectValue(MarketplaceResource); + } writer.WriteEndObject(); } @@ -41,9 +56,12 @@ internal static AppPlatformServiceProperties DeserializeAppPlatformServiceProper Optional vnetAddons = default; Optional version = default; Optional serviceId = default; + Optional managedEnvironmentId = default; + Optional infraResourceGroup = default; Optional powerState = default; Optional zoneRedundant = default; Optional fqdn = default; + Optional marketplaceResource = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("provisioningState"u8)) @@ -96,6 +114,16 @@ internal static AppPlatformServiceProperties DeserializeAppPlatformServiceProper serviceId = property.Value.GetGuid(); continue; } + if (property.NameEquals("managedEnvironmentId"u8)) + { + managedEnvironmentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("infraResourceGroup"u8)) + { + infraResourceGroup = property.Value.GetString(); + continue; + } if (property.NameEquals("powerState"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -121,8 +149,18 @@ internal static AppPlatformServiceProperties DeserializeAppPlatformServiceProper fqdn = property.Value.GetString(); continue; } + if (property.NameEquals("marketplaceResource"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + marketplaceResource = MarketplaceResource.DeserializeMarketplaceResource(property.Value); + continue; + } } - return new AppPlatformServiceProperties(Optional.ToNullable(provisioningState), networkProfile.Value, vnetAddons.Value, Optional.ToNullable(version), Optional.ToNullable(serviceId), Optional.ToNullable(powerState), Optional.ToNullable(zoneRedundant), fqdn.Value); + return new AppPlatformServiceProperties(Optional.ToNullable(provisioningState), networkProfile.Value, vnetAddons.Value, Optional.ToNullable(version), Optional.ToNullable(serviceId), managedEnvironmentId.Value, infraResourceGroup.Value, Optional.ToNullable(powerState), Optional.ToNullable(zoneRedundant), fqdn.Value, marketplaceResource.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformServiceProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformServiceProperties.cs index 1ad022d6c729..14f986d54be5 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformServiceProperties.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformServiceProperties.cs @@ -23,19 +23,25 @@ public AppPlatformServiceProperties() /// Additional Service settings in vnet injection instance. /// Version of the Service. /// ServiceInstanceEntity GUID which uniquely identifies a created resource. + /// The resource Id of the Managed Environment that the Spring Apps instance builds on. + /// The name of the resource group that contains the infrastructure resources. /// Power state of the Service. /// /// Fully qualified dns name of the service instance. - internal AppPlatformServiceProperties(AppPlatformServiceProvisioningState? provisioningState, AppPlatformServiceNetworkProfile networkProfile, ServiceVnetAddons vnetAddons, int? version, Guid? serviceId, AppPlatformServicePowerState? powerState, bool? isZoneRedundant, string fqdn) + /// Purchasing 3rd party product of the Service resource. + internal AppPlatformServiceProperties(AppPlatformServiceProvisioningState? provisioningState, AppPlatformServiceNetworkProfile networkProfile, ServiceVnetAddons vnetAddons, int? version, Guid? serviceId, string managedEnvironmentId, string infraResourceGroup, AppPlatformServicePowerState? powerState, bool? isZoneRedundant, string fqdn, MarketplaceResource marketplaceResource) { ProvisioningState = provisioningState; NetworkProfile = networkProfile; VnetAddons = vnetAddons; Version = version; ServiceId = serviceId; + ManagedEnvironmentId = managedEnvironmentId; + InfraResourceGroup = infraResourceGroup; PowerState = powerState; IsZoneRedundant = isZoneRedundant; Fqdn = fqdn; + MarketplaceResource = marketplaceResource; } /// Provisioning state of the Service. @@ -60,11 +66,17 @@ public bool? IsLogStreamPublicEndpoint public int? Version { get; } /// ServiceInstanceEntity GUID which uniquely identifies a created resource. public Guid? ServiceId { get; } + /// The resource Id of the Managed Environment that the Spring Apps instance builds on. + public string ManagedEnvironmentId { get; set; } + /// The name of the resource group that contains the infrastructure resources. + public string InfraResourceGroup { get; set; } /// Power state of the Service. public AppPlatformServicePowerState? PowerState { get; } /// Gets or sets the is zone redundant. public bool? IsZoneRedundant { get; set; } /// Fully qualified dns name of the service instance. public string Fqdn { get; } + /// Purchasing 3rd party product of the Service resource. + public MarketplaceResource MarketplaceResource { get; set; } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorComponent.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorComponent.Serialization.cs new file mode 100644 index 000000000000..ab99df5915b7 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorComponent.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class ApplicationAcceleratorComponent + { + internal static ApplicationAcceleratorComponent DeserializeApplicationAcceleratorComponent(JsonElement element) + { + Optional name = default; + Optional resourceRequests = default; + Optional> instances = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + resourceRequests = ApplicationAcceleratorResourceRequests.DeserializeApplicationAcceleratorResourceRequests(property.Value); + continue; + } + if (property.NameEquals("instances"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ApplicationAcceleratorInstance.DeserializeApplicationAcceleratorInstance(item)); + } + instances = array; + continue; + } + } + return new ApplicationAcceleratorComponent(name.Value, resourceRequests.Value, Optional.ToList(instances)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorComponent.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorComponent.cs new file mode 100644 index 000000000000..9168d7d9543b --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorComponent.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// The ApplicationAcceleratorComponent. + public partial class ApplicationAcceleratorComponent + { + /// Initializes a new instance of ApplicationAcceleratorComponent. + internal ApplicationAcceleratorComponent() + { + Instances = new ChangeTrackingList(); + } + + /// Initializes a new instance of ApplicationAcceleratorComponent. + /// + /// + /// + internal ApplicationAcceleratorComponent(string name, ApplicationAcceleratorResourceRequests resourceRequests, IReadOnlyList instances) + { + Name = name; + ResourceRequests = resourceRequests; + Instances = instances; + } + + /// Gets the name. + public string Name { get; } + /// Gets the resource requests. + public ApplicationAcceleratorResourceRequests ResourceRequests { get; } + /// Gets the instances. + public IReadOnlyList Instances { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorInstance.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorInstance.Serialization.cs new file mode 100644 index 000000000000..11ec1a7fb231 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorInstance.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class ApplicationAcceleratorInstance + { + internal static ApplicationAcceleratorInstance DeserializeApplicationAcceleratorInstance(JsonElement element) + { + Optional name = default; + Optional status = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + status = property.Value.GetString(); + continue; + } + } + return new ApplicationAcceleratorInstance(name.Value, status.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorInstance.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorInstance.cs new file mode 100644 index 000000000000..97163dfb2c5f --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorInstance.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// The ApplicationAcceleratorInstance. + public partial class ApplicationAcceleratorInstance + { + /// Initializes a new instance of ApplicationAcceleratorInstance. + internal ApplicationAcceleratorInstance() + { + } + + /// Initializes a new instance of ApplicationAcceleratorInstance. + /// Name of the Application Accelerator instance. + /// Status of the Application Accelerator instance. It can be Pending, Running, Succeeded, Failed, Unknown. + internal ApplicationAcceleratorInstance(string name, string status) + { + Name = name; + Status = status; + } + + /// Name of the Application Accelerator instance. + public string Name { get; } + /// Status of the Application Accelerator instance. It can be Pending, Running, Succeeded, Failed, Unknown. + public string Status { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorProperties.Serialization.cs new file mode 100644 index 000000000000..6fd7b672edd4 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorProperties.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class ApplicationAcceleratorProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WriteEndObject(); + } + + internal static ApplicationAcceleratorProperties DeserializeApplicationAcceleratorProperties(JsonElement element) + { + Optional provisioningState = default; + Optional> components = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new ApplicationAcceleratorProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("components"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ApplicationAcceleratorComponent.DeserializeApplicationAcceleratorComponent(item)); + } + components = array; + continue; + } + } + return new ApplicationAcceleratorProperties(Optional.ToNullable(provisioningState), Optional.ToList(components)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorProperties.cs new file mode 100644 index 000000000000..5da2518ca497 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorProperties.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Application accelerator properties payload. + public partial class ApplicationAcceleratorProperties + { + /// Initializes a new instance of ApplicationAcceleratorProperties. + public ApplicationAcceleratorProperties() + { + Components = new ChangeTrackingList(); + } + + /// Initializes a new instance of ApplicationAcceleratorProperties. + /// State of the application accelerator. + /// Collection of components belong to application accelerator. + internal ApplicationAcceleratorProperties(ApplicationAcceleratorProvisioningState? provisioningState, IReadOnlyList components) + { + ProvisioningState = provisioningState; + Components = components; + } + + /// State of the application accelerator. + public ApplicationAcceleratorProvisioningState? ProvisioningState { get; } + /// Collection of components belong to application accelerator. + public IReadOnlyList Components { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorProvisioningState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorProvisioningState.cs new file mode 100644 index 000000000000..1f1bb55ee8a9 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorProvisioningState.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// State of the application accelerator. + public readonly partial struct ApplicationAcceleratorProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ApplicationAcceleratorProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatingValue = "Creating"; + private const string UpdatingValue = "Updating"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string DeletingValue = "Deleting"; + + /// Creating. + public static ApplicationAcceleratorProvisioningState Creating { get; } = new ApplicationAcceleratorProvisioningState(CreatingValue); + /// Updating. + public static ApplicationAcceleratorProvisioningState Updating { get; } = new ApplicationAcceleratorProvisioningState(UpdatingValue); + /// Succeeded. + public static ApplicationAcceleratorProvisioningState Succeeded { get; } = new ApplicationAcceleratorProvisioningState(SucceededValue); + /// Failed. + public static ApplicationAcceleratorProvisioningState Failed { get; } = new ApplicationAcceleratorProvisioningState(FailedValue); + /// Deleting. + public static ApplicationAcceleratorProvisioningState Deleting { get; } = new ApplicationAcceleratorProvisioningState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(ApplicationAcceleratorProvisioningState left, ApplicationAcceleratorProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ApplicationAcceleratorProvisioningState left, ApplicationAcceleratorProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ApplicationAcceleratorProvisioningState(string value) => new ApplicationAcceleratorProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ApplicationAcceleratorProvisioningState other && Equals(other); + /// + public bool Equals(ApplicationAcceleratorProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorResourceCollection.Serialization.cs new file mode 100644 index 000000000000..4dc8c9a92fd7 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorResourceCollection.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class ApplicationAcceleratorResourceCollection + { + internal static ApplicationAcceleratorResourceCollection DeserializeApplicationAcceleratorResourceCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ApplicationAcceleratorResourceData.DeserializeApplicationAcceleratorResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new ApplicationAcceleratorResourceCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorResourceCollection.cs new file mode 100644 index 000000000000..a9344cc368a0 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorResourceCollection.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Object that includes an array of application accelerator resources and a possible link for next set. + internal partial class ApplicationAcceleratorResourceCollection + { + /// Initializes a new instance of ApplicationAcceleratorResourceCollection. + internal ApplicationAcceleratorResourceCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of ApplicationAcceleratorResourceCollection. + /// Collection of application accelerator resources. + /// + /// URL client should use to fetch the next page (per server side paging). + /// It's null for now, added for future use. + /// + internal ApplicationAcceleratorResourceCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of application accelerator resources. + public IReadOnlyList Value { get; } + /// + /// URL client should use to fetch the next page (per server side paging). + /// It's null for now, added for future use. + /// + public string NextLink { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorResourceData.Serialization.cs new file mode 100644 index 000000000000..fd360ebb1bf1 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorResourceData.Serialization.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + public partial class ApplicationAcceleratorResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku); + } + writer.WriteEndObject(); + } + + internal static ApplicationAcceleratorResourceData DeserializeApplicationAcceleratorResourceData(JsonElement element) + { + Optional properties = default; + Optional sku = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = ApplicationAcceleratorProperties.DeserializeApplicationAcceleratorProperties(property.Value); + continue; + } + if (property.NameEquals("sku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sku = AppPlatformSku.DeserializeAppPlatformSku(property.Value); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new ApplicationAcceleratorResourceData(id, name, type, systemData.Value, properties.Value, sku.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorResourceRequests.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorResourceRequests.Serialization.cs new file mode 100644 index 000000000000..4b535a4c2507 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorResourceRequests.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class ApplicationAcceleratorResourceRequests + { + internal static ApplicationAcceleratorResourceRequests DeserializeApplicationAcceleratorResourceRequests(JsonElement element) + { + Optional cpu = default; + Optional memory = default; + Optional instanceCount = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("cpu"u8)) + { + cpu = property.Value.GetString(); + continue; + } + if (property.NameEquals("memory"u8)) + { + memory = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + instanceCount = property.Value.GetInt32(); + continue; + } + } + return new ApplicationAcceleratorResourceRequests(cpu.Value, memory.Value, Optional.ToNullable(instanceCount)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorResourceRequests.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorResourceRequests.cs new file mode 100644 index 000000000000..b58a57ebb142 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorResourceRequests.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// The ApplicationAcceleratorResourceRequests. + public partial class ApplicationAcceleratorResourceRequests + { + /// Initializes a new instance of ApplicationAcceleratorResourceRequests. + internal ApplicationAcceleratorResourceRequests() + { + } + + /// Initializes a new instance of ApplicationAcceleratorResourceRequests. + /// Cpu allocated to each application accelerator component. 1 core can be represented by 1 or 1000m. + /// Memory allocated to each application accelerator component. 1 GB can be represented by 1Gi or 1024Mi. + /// Instance count of the application accelerator component. + internal ApplicationAcceleratorResourceRequests(string cpu, string memory, int? instanceCount) + { + Cpu = cpu; + Memory = memory; + InstanceCount = instanceCount; + } + + /// Cpu allocated to each application accelerator component. 1 core can be represented by 1 or 1000m. + public string Cpu { get; } + /// Memory allocated to each application accelerator component. 1 GB can be represented by 1Gi or 1024Mi. + public string Memory { get; } + /// Instance count of the application accelerator component. + public int? InstanceCount { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewComponent.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewComponent.Serialization.cs new file mode 100644 index 000000000000..a24526285486 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewComponent.Serialization.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class ApplicationLiveViewComponent + { + internal static ApplicationLiveViewComponent DeserializeApplicationLiveViewComponent(JsonElement element) + { + Optional name = default; + Optional resourceRequests = default; + Optional> instances = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + name = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("resourceRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + resourceRequests = ApplicationLiveViewResourceRequests.DeserializeApplicationLiveViewResourceRequests(property.Value); + continue; + } + if (property.NameEquals("instances"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ApplicationLiveViewInstance.DeserializeApplicationLiveViewInstance(item)); + } + instances = array; + continue; + } + } + return new ApplicationLiveViewComponent(name.Value, resourceRequests.Value, Optional.ToList(instances)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewComponent.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewComponent.cs new file mode 100644 index 000000000000..6c29a25800d8 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewComponent.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Application Live View properties payload. + public partial class ApplicationLiveViewComponent + { + /// Initializes a new instance of ApplicationLiveViewComponent. + internal ApplicationLiveViewComponent() + { + Instances = new ChangeTrackingList(); + } + + /// Initializes a new instance of ApplicationLiveViewComponent. + /// Name of the component. + /// The requested resource quantity for required CPU and Memory. + /// Collection of instances belong to Application Live View. + internal ApplicationLiveViewComponent(BinaryData name, ApplicationLiveViewResourceRequests resourceRequests, IReadOnlyList instances) + { + Name = name; + ResourceRequests = resourceRequests; + Instances = instances; + } + + /// + /// Name of the component. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formated json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public BinaryData Name { get; } + /// The requested resource quantity for required CPU and Memory. + public ApplicationLiveViewResourceRequests ResourceRequests { get; } + /// Collection of instances belong to Application Live View. + public IReadOnlyList Instances { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewInstance.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewInstance.Serialization.cs new file mode 100644 index 000000000000..a76e955912f2 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewInstance.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class ApplicationLiveViewInstance + { + internal static ApplicationLiveViewInstance DeserializeApplicationLiveViewInstance(JsonElement element) + { + Optional name = default; + Optional status = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + status = property.Value.GetString(); + continue; + } + } + return new ApplicationLiveViewInstance(name.Value, status.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewInstance.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewInstance.cs new file mode 100644 index 000000000000..fc4594805773 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewInstance.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Collection of instances belong to the Application Live View. + public partial class ApplicationLiveViewInstance + { + /// Initializes a new instance of ApplicationLiveViewInstance. + internal ApplicationLiveViewInstance() + { + } + + /// Initializes a new instance of ApplicationLiveViewInstance. + /// Name of the Application Live View instance. + /// Status of the Application Live View instance. It can be Pending, Running, Succeeded, Failed, Unknown. + internal ApplicationLiveViewInstance(string name, string status) + { + Name = name; + Status = status; + } + + /// Name of the Application Live View instance. + public string Name { get; } + /// Status of the Application Live View instance. It can be Pending, Running, Succeeded, Failed, Unknown. + public string Status { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewProperties.Serialization.cs new file mode 100644 index 000000000000..6c4f8281d28a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewProperties.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class ApplicationLiveViewProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WriteEndObject(); + } + + internal static ApplicationLiveViewProperties DeserializeApplicationLiveViewProperties(JsonElement element) + { + Optional provisioningState = default; + Optional> components = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new ApplicationLiveViewProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("components"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ApplicationLiveViewComponent.DeserializeApplicationLiveViewComponent(item)); + } + components = array; + continue; + } + } + return new ApplicationLiveViewProperties(Optional.ToNullable(provisioningState), Optional.ToList(components)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewProperties.cs new file mode 100644 index 000000000000..5e4961b7b2e8 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewProperties.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Application Live View properties payload. + public partial class ApplicationLiveViewProperties + { + /// Initializes a new instance of ApplicationLiveViewProperties. + public ApplicationLiveViewProperties() + { + Components = new ChangeTrackingList(); + } + + /// Initializes a new instance of ApplicationLiveViewProperties. + /// State of the Application Live View. + /// Component details of Application Live View. + internal ApplicationLiveViewProperties(ApplicationLiveViewProvisioningState? provisioningState, IReadOnlyList components) + { + ProvisioningState = provisioningState; + Components = components; + } + + /// State of the Application Live View. + public ApplicationLiveViewProvisioningState? ProvisioningState { get; } + /// Component details of Application Live View. + public IReadOnlyList Components { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewProvisioningState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewProvisioningState.cs new file mode 100644 index 000000000000..f23fa5de0dea --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewProvisioningState.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// State of the Application Live View. + public readonly partial struct ApplicationLiveViewProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ApplicationLiveViewProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatingValue = "Creating"; + private const string UpdatingValue = "Updating"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string DeletingValue = "Deleting"; + private const string CanceledValue = "Canceled"; + + /// Creating. + public static ApplicationLiveViewProvisioningState Creating { get; } = new ApplicationLiveViewProvisioningState(CreatingValue); + /// Updating. + public static ApplicationLiveViewProvisioningState Updating { get; } = new ApplicationLiveViewProvisioningState(UpdatingValue); + /// Succeeded. + public static ApplicationLiveViewProvisioningState Succeeded { get; } = new ApplicationLiveViewProvisioningState(SucceededValue); + /// Failed. + public static ApplicationLiveViewProvisioningState Failed { get; } = new ApplicationLiveViewProvisioningState(FailedValue); + /// Deleting. + public static ApplicationLiveViewProvisioningState Deleting { get; } = new ApplicationLiveViewProvisioningState(DeletingValue); + /// Canceled. + public static ApplicationLiveViewProvisioningState Canceled { get; } = new ApplicationLiveViewProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(ApplicationLiveViewProvisioningState left, ApplicationLiveViewProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ApplicationLiveViewProvisioningState left, ApplicationLiveViewProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ApplicationLiveViewProvisioningState(string value) => new ApplicationLiveViewProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ApplicationLiveViewProvisioningState other && Equals(other); + /// + public bool Equals(ApplicationLiveViewProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewResourceCollection.Serialization.cs new file mode 100644 index 000000000000..f1fd8ce1a1b1 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewResourceCollection.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class ApplicationLiveViewResourceCollection + { + internal static ApplicationLiveViewResourceCollection DeserializeApplicationLiveViewResourceCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ApplicationLiveViewResourceData.DeserializeApplicationLiveViewResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new ApplicationLiveViewResourceCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewResourceCollection.cs new file mode 100644 index 000000000000..9145392bba89 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewResourceCollection.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Object that includes an array of Application Live View resources and a possible link for next set. + internal partial class ApplicationLiveViewResourceCollection + { + /// Initializes a new instance of ApplicationLiveViewResourceCollection. + internal ApplicationLiveViewResourceCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of ApplicationLiveViewResourceCollection. + /// Collection of Application Live View resources. + /// + /// URL client should use to fetch the next page (per server side paging). + /// It's null for now, added for future use. + /// + internal ApplicationLiveViewResourceCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of Application Live View resources. + public IReadOnlyList Value { get; } + /// + /// URL client should use to fetch the next page (per server side paging). + /// It's null for now, added for future use. + /// + public string NextLink { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewResourceData.Serialization.cs new file mode 100644 index 000000000000..82a94994cad6 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewResourceData.Serialization.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + public partial class ApplicationLiveViewResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + + internal static ApplicationLiveViewResourceData DeserializeApplicationLiveViewResourceData(JsonElement element) + { + Optional properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = ApplicationLiveViewProperties.DeserializeApplicationLiveViewProperties(property.Value); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new ApplicationLiveViewResourceData(id, name, type, systemData.Value, properties.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewResourceRequests.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewResourceRequests.Serialization.cs new file mode 100644 index 000000000000..1e3762ec0010 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewResourceRequests.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class ApplicationLiveViewResourceRequests + { + internal static ApplicationLiveViewResourceRequests DeserializeApplicationLiveViewResourceRequests(JsonElement element) + { + Optional cpu = default; + Optional memory = default; + Optional instanceCount = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("cpu"u8)) + { + cpu = property.Value.GetString(); + continue; + } + if (property.NameEquals("memory"u8)) + { + memory = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + instanceCount = property.Value.GetInt32(); + continue; + } + } + return new ApplicationLiveViewResourceRequests(cpu.Value, memory.Value, Optional.ToNullable(instanceCount)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewResourceRequests.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewResourceRequests.cs new file mode 100644 index 000000000000..a521a118f8f3 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewResourceRequests.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// The resource quantity for required CPU and Memory of Application Live View component. + public partial class ApplicationLiveViewResourceRequests + { + /// Initializes a new instance of ApplicationLiveViewResourceRequests. + internal ApplicationLiveViewResourceRequests() + { + } + + /// Initializes a new instance of ApplicationLiveViewResourceRequests. + /// Cpu quantity allocated to each Application Live View component instance. 1 core can be represented by 1 or 1000m. + /// Memory quantity allocated to each Application Live View component instance. 1 GB can be represented by 1Gi or 1024Mi. + /// Desired instance count of Application Live View component instance. + internal ApplicationLiveViewResourceRequests(string cpu, string memory, int? instanceCount) + { + Cpu = cpu; + Memory = memory; + InstanceCount = instanceCount; + } + + /// Cpu quantity allocated to each Application Live View component instance. 1 core can be represented by 1 or 1000m. + public string Cpu { get; } + /// Memory quantity allocated to each Application Live View component instance. 1 GB can be represented by 1Gi or 1024Mi. + public string Memory { get; } + /// Desired instance count of Application Live View component instance. + public int? InstanceCount { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingType.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingType.cs index ef8a8fdb5fbb..eed4518e7bcf 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingType.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingType.cs @@ -28,6 +28,7 @@ public BuildpackBindingType(string value) private const string DynatraceValue = "Dynatrace"; private const string NewRelicValue = "NewRelic"; private const string ElasticApmValue = "ElasticAPM"; + private const string CACertificatesValue = "CACertificates"; /// ApplicationInsights. public static BuildpackBindingType ApplicationInsights { get; } = new BuildpackBindingType(ApplicationInsightsValue); @@ -41,6 +42,8 @@ public BuildpackBindingType(string value) public static BuildpackBindingType NewRelic { get; } = new BuildpackBindingType(NewRelicValue); /// ElasticAPM. public static BuildpackBindingType ElasticApm { get; } = new BuildpackBindingType(ElasticApmValue); + /// CACertificates. + public static BuildpackBindingType CACertificates { get; } = new BuildpackBindingType(CACertificatesValue); /// Determines if two values are the same. public static bool operator ==(BuildpackBindingType left, BuildpackBindingType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomScaleRule.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomScaleRule.Serialization.cs new file mode 100644 index 000000000000..cc0dd7be093d --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomScaleRule.Serialization.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class CustomScaleRule : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(CustomScaleRuleType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(CustomScaleRuleType); + } + if (Optional.IsCollectionDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Auth)) + { + writer.WritePropertyName("auth"u8); + writer.WriteStartArray(); + foreach (var item in Auth) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static CustomScaleRule DeserializeCustomScaleRule(JsonElement element) + { + Optional type = default; + Optional> metadata = default; + Optional> auth = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + metadata = dictionary; + continue; + } + if (property.NameEquals("auth"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ScaleRuleAuth.DeserializeScaleRuleAuth(item)); + } + auth = array; + continue; + } + } + return new CustomScaleRule(type.Value, Optional.ToDictionary(metadata), Optional.ToList(auth)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomScaleRule.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomScaleRule.cs new file mode 100644 index 000000000000..b77ed4a91fa7 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomScaleRule.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Azure Spring Apps App Instance Custom scaling rule. + public partial class CustomScaleRule + { + /// Initializes a new instance of CustomScaleRule. + public CustomScaleRule() + { + Metadata = new ChangeTrackingDictionary(); + Auth = new ChangeTrackingList(); + } + + /// Initializes a new instance of CustomScaleRule. + /// + /// Type of the custom scale rule + /// eg: azure-servicebus, redis etc. + /// + /// Metadata properties to describe custom scale rule. + /// Authentication secrets for the custom scale rule. + internal CustomScaleRule(string customScaleRuleType, IDictionary metadata, IList auth) + { + CustomScaleRuleType = customScaleRuleType; + Metadata = metadata; + Auth = auth; + } + + /// + /// Type of the custom scale rule + /// eg: azure-servicebus, redis etc. + /// + public string CustomScaleRuleType { get; set; } + /// Metadata properties to describe custom scale rule. + public IDictionary Metadata { get; } + /// Authentication secrets for the custom scale rule. + public IList Auth { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorProperties.Serialization.cs new file mode 100644 index 000000000000..53330ea0dfd8 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorProperties.Serialization.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class CustomizedAcceleratorProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(IconUri)) + { + writer.WritePropertyName("iconUrl"u8); + writer.WriteStringValue(IconUri.AbsoluteUri); + } + if (Optional.IsCollectionDefined(AcceleratorTags)) + { + writer.WritePropertyName("acceleratorTags"u8); + writer.WriteStartArray(); + foreach (var item in AcceleratorTags) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("gitRepository"u8); + writer.WriteObjectValue(GitRepository); + writer.WriteEndObject(); + } + + internal static CustomizedAcceleratorProperties DeserializeCustomizedAcceleratorProperties(JsonElement element) + { + Optional provisioningState = default; + Optional displayName = default; + Optional description = default; + Optional iconUri = default; + Optional> acceleratorTags = default; + AcceleratorGitRepository gitRepository = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new CustomizedAcceleratorProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("iconUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + iconUri = null; + continue; + } + iconUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("acceleratorTags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + acceleratorTags = array; + continue; + } + if (property.NameEquals("gitRepository"u8)) + { + gitRepository = AcceleratorGitRepository.DeserializeAcceleratorGitRepository(property.Value); + continue; + } + } + return new CustomizedAcceleratorProperties(Optional.ToNullable(provisioningState), displayName.Value, description.Value, iconUri.Value, Optional.ToList(acceleratorTags), gitRepository); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorProperties.cs new file mode 100644 index 000000000000..1e6cbd39df2b --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorProperties.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Customized accelerator properties payload. + public partial class CustomizedAcceleratorProperties + { + /// Initializes a new instance of CustomizedAcceleratorProperties. + /// + /// is null. + public CustomizedAcceleratorProperties(AcceleratorGitRepository gitRepository) + { + Argument.AssertNotNull(gitRepository, nameof(gitRepository)); + + AcceleratorTags = new ChangeTrackingList(); + GitRepository = gitRepository; + } + + /// Initializes a new instance of CustomizedAcceleratorProperties. + /// State of the customized accelerator. + /// + /// + /// + /// + /// + internal CustomizedAcceleratorProperties(CustomizedAcceleratorProvisioningState? provisioningState, string displayName, string description, Uri iconUri, IList acceleratorTags, AcceleratorGitRepository gitRepository) + { + ProvisioningState = provisioningState; + DisplayName = displayName; + Description = description; + IconUri = iconUri; + AcceleratorTags = acceleratorTags; + GitRepository = gitRepository; + } + + /// State of the customized accelerator. + public CustomizedAcceleratorProvisioningState? ProvisioningState { get; } + /// Gets or sets the display name. + public string DisplayName { get; set; } + /// Gets or sets the description. + public string Description { get; set; } + /// Gets or sets the icon uri. + public Uri IconUri { get; set; } + /// Gets the accelerator tags. + public IList AcceleratorTags { get; } + /// Gets or sets the git repository. + public AcceleratorGitRepository GitRepository { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorProvisioningState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorProvisioningState.cs new file mode 100644 index 000000000000..8bfafc054531 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorProvisioningState.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// State of the customized accelerator. + public readonly partial struct CustomizedAcceleratorProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CustomizedAcceleratorProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatingValue = "Creating"; + private const string UpdatingValue = "Updating"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string DeletingValue = "Deleting"; + + /// Creating. + public static CustomizedAcceleratorProvisioningState Creating { get; } = new CustomizedAcceleratorProvisioningState(CreatingValue); + /// Updating. + public static CustomizedAcceleratorProvisioningState Updating { get; } = new CustomizedAcceleratorProvisioningState(UpdatingValue); + /// Succeeded. + public static CustomizedAcceleratorProvisioningState Succeeded { get; } = new CustomizedAcceleratorProvisioningState(SucceededValue); + /// Failed. + public static CustomizedAcceleratorProvisioningState Failed { get; } = new CustomizedAcceleratorProvisioningState(FailedValue); + /// Deleting. + public static CustomizedAcceleratorProvisioningState Deleting { get; } = new CustomizedAcceleratorProvisioningState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(CustomizedAcceleratorProvisioningState left, CustomizedAcceleratorProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CustomizedAcceleratorProvisioningState left, CustomizedAcceleratorProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator CustomizedAcceleratorProvisioningState(string value) => new CustomizedAcceleratorProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CustomizedAcceleratorProvisioningState other && Equals(other); + /// + public bool Equals(CustomizedAcceleratorProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorResourceCollection.Serialization.cs new file mode 100644 index 000000000000..49fef756077c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorResourceCollection.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class CustomizedAcceleratorResourceCollection + { + internal static CustomizedAcceleratorResourceCollection DeserializeCustomizedAcceleratorResourceCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CustomizedAcceleratorResourceData.DeserializeCustomizedAcceleratorResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new CustomizedAcceleratorResourceCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorResourceCollection.cs new file mode 100644 index 000000000000..53b0afa6dfab --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorResourceCollection.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// The CustomizedAcceleratorResourceCollection. + internal partial class CustomizedAcceleratorResourceCollection + { + /// Initializes a new instance of CustomizedAcceleratorResourceCollection. + internal CustomizedAcceleratorResourceCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of CustomizedAcceleratorResourceCollection. + /// + /// + internal CustomizedAcceleratorResourceCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Gets the value. + public IReadOnlyList Value { get; } + /// Gets the next link. + public string NextLink { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorResourceData.Serialization.cs new file mode 100644 index 000000000000..4a6aba34241f --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorResourceData.Serialization.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + public partial class CustomizedAcceleratorResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku); + } + writer.WriteEndObject(); + } + + internal static CustomizedAcceleratorResourceData DeserializeCustomizedAcceleratorResourceData(JsonElement element) + { + Optional properties = default; + Optional sku = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = CustomizedAcceleratorProperties.DeserializeCustomizedAcceleratorProperties(property.Value); + continue; + } + if (property.NameEquals("sku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sku = AppPlatformSku.DeserializeAppPlatformSku(property.Value); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new CustomizedAcceleratorResourceData(id, name, type, systemData.Value, properties.Value, sku.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorValidateResult.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorValidateResult.Serialization.cs new file mode 100644 index 000000000000..0714869d3dca --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorValidateResult.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class CustomizedAcceleratorValidateResult + { + internal static CustomizedAcceleratorValidateResult DeserializeCustomizedAcceleratorValidateResult(JsonElement element) + { + Optional state = default; + Optional errorMessage = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + state = new CustomizedAcceleratorValidateResultState(property.Value.GetString()); + continue; + } + if (property.NameEquals("errorMessage"u8)) + { + errorMessage = property.Value.GetString(); + continue; + } + } + return new CustomizedAcceleratorValidateResult(Optional.ToNullable(state), errorMessage.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorValidateResult.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorValidateResult.cs new file mode 100644 index 000000000000..769bbd98b44c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorValidateResult.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Validation result for customized accelerator properties. + public partial class CustomizedAcceleratorValidateResult + { + /// Initializes a new instance of CustomizedAcceleratorValidateResult. + internal CustomizedAcceleratorValidateResult() + { + } + + /// Initializes a new instance of CustomizedAcceleratorValidateResult. + /// State of the customized accelerator validation result. + /// The detail validation results. + internal CustomizedAcceleratorValidateResult(CustomizedAcceleratorValidateResultState? state, string errorMessage) + { + State = state; + ErrorMessage = errorMessage; + } + + /// State of the customized accelerator validation result. + public CustomizedAcceleratorValidateResultState? State { get; } + /// The detail validation results. + public string ErrorMessage { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorValidateResultState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorValidateResultState.cs new file mode 100644 index 000000000000..1b7dbecd7d43 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorValidateResultState.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// State of the customized accelerator validation result. + public readonly partial struct CustomizedAcceleratorValidateResultState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CustomizedAcceleratorValidateResultState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ValidValue = "Valid"; + private const string InvalidValue = "Invalid"; + + /// Customized accelerator properties are valid. + public static CustomizedAcceleratorValidateResultState Valid { get; } = new CustomizedAcceleratorValidateResultState(ValidValue); + /// Customized accelerator properties are invalid. + public static CustomizedAcceleratorValidateResultState Invalid { get; } = new CustomizedAcceleratorValidateResultState(InvalidValue); + /// Determines if two values are the same. + public static bool operator ==(CustomizedAcceleratorValidateResultState left, CustomizedAcceleratorValidateResultState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CustomizedAcceleratorValidateResultState left, CustomizedAcceleratorValidateResultState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator CustomizedAcceleratorValidateResultState(string value) => new CustomizedAcceleratorValidateResultState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CustomizedAcceleratorValidateResultState other && Equals(other); + /// + public bool Equals(CustomizedAcceleratorValidateResultState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalFeatureDetail.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalFeatureDetail.Serialization.cs new file mode 100644 index 000000000000..cb055ba7db76 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalFeatureDetail.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class DevToolPortalFeatureDetail : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static DevToolPortalFeatureDetail DeserializeDevToolPortalFeatureDetail(JsonElement element) + { + Optional state = default; + Optional route = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + state = new DevToolPortalFeatureState(property.Value.GetString()); + continue; + } + if (property.NameEquals("route"u8)) + { + route = property.Value.GetString(); + continue; + } + } + return new DevToolPortalFeatureDetail(Optional.ToNullable(state), route.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalFeatureDetail.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalFeatureDetail.cs new file mode 100644 index 000000000000..c4efaea326b6 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalFeatureDetail.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Detail settings for Dev Tool Portal feature. + public partial class DevToolPortalFeatureDetail + { + /// Initializes a new instance of DevToolPortalFeatureDetail. + public DevToolPortalFeatureDetail() + { + } + + /// Initializes a new instance of DevToolPortalFeatureDetail. + /// State of the plugin. + /// Route path to visit the plugin. + internal DevToolPortalFeatureDetail(DevToolPortalFeatureState? state, string route) + { + State = state; + Route = route; + } + + /// State of the plugin. + public DevToolPortalFeatureState? State { get; set; } + /// Route path to visit the plugin. + public string Route { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalFeatureSettings.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalFeatureSettings.Serialization.cs new file mode 100644 index 000000000000..cacad5d747a5 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalFeatureSettings.Serialization.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class DevToolPortalFeatureSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ApplicationAccelerator)) + { + writer.WritePropertyName("applicationAccelerator"u8); + writer.WriteObjectValue(ApplicationAccelerator); + } + if (Optional.IsDefined(ApplicationLiveView)) + { + writer.WritePropertyName("applicationLiveView"u8); + writer.WriteObjectValue(ApplicationLiveView); + } + writer.WriteEndObject(); + } + + internal static DevToolPortalFeatureSettings DeserializeDevToolPortalFeatureSettings(JsonElement element) + { + Optional applicationAccelerator = default; + Optional applicationLiveView = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("applicationAccelerator"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + applicationAccelerator = DevToolPortalFeatureDetail.DeserializeDevToolPortalFeatureDetail(property.Value); + continue; + } + if (property.NameEquals("applicationLiveView"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + applicationLiveView = DevToolPortalFeatureDetail.DeserializeDevToolPortalFeatureDetail(property.Value); + continue; + } + } + return new DevToolPortalFeatureSettings(applicationAccelerator.Value, applicationLiveView.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalFeatureSettings.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalFeatureSettings.cs new file mode 100644 index 000000000000..ca24c617edb4 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalFeatureSettings.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Settings for Dev Tool Portal. + public partial class DevToolPortalFeatureSettings + { + /// Initializes a new instance of DevToolPortalFeatureSettings. + public DevToolPortalFeatureSettings() + { + } + + /// Initializes a new instance of DevToolPortalFeatureSettings. + /// Detail of Accelerator plugin. + /// Detail of App Live View plugin. + internal DevToolPortalFeatureSettings(DevToolPortalFeatureDetail applicationAccelerator, DevToolPortalFeatureDetail applicationLiveView) + { + ApplicationAccelerator = applicationAccelerator; + ApplicationLiveView = applicationLiveView; + } + + /// Detail of Accelerator plugin. + public DevToolPortalFeatureDetail ApplicationAccelerator { get; set; } + /// Detail of App Live View plugin. + public DevToolPortalFeatureDetail ApplicationLiveView { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalFeatureState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalFeatureState.cs new file mode 100644 index 000000000000..7057e8d09185 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalFeatureState.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// State of the plugin. + public readonly partial struct DevToolPortalFeatureState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DevToolPortalFeatureState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Enable the plugin in Dev Tool Portal. + public static DevToolPortalFeatureState Enabled { get; } = new DevToolPortalFeatureState(EnabledValue); + /// Disable the plugin in Dev Tool Portal. + public static DevToolPortalFeatureState Disabled { get; } = new DevToolPortalFeatureState(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(DevToolPortalFeatureState left, DevToolPortalFeatureState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DevToolPortalFeatureState left, DevToolPortalFeatureState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DevToolPortalFeatureState(string value) => new DevToolPortalFeatureState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DevToolPortalFeatureState other && Equals(other); + /// + public bool Equals(DevToolPortalFeatureState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalInstance.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalInstance.Serialization.cs new file mode 100644 index 000000000000..de55cc6e442a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalInstance.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class DevToolPortalInstance + { + internal static DevToolPortalInstance DeserializeDevToolPortalInstance(JsonElement element) + { + Optional name = default; + Optional status = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + status = property.Value.GetString(); + continue; + } + } + return new DevToolPortalInstance(name.Value, status.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalInstance.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalInstance.cs new file mode 100644 index 000000000000..4244bba2b4c3 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalInstance.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Collection of instances belong to the Dev Tool Portal. + public partial class DevToolPortalInstance + { + /// Initializes a new instance of DevToolPortalInstance. + internal DevToolPortalInstance() + { + } + + /// Initializes a new instance of DevToolPortalInstance. + /// Name of the Dev Tool Portal instance. + /// Status of the Dev Tool Portal instance. It can be Pending, Running, Succeeded, Failed, Unknown. + internal DevToolPortalInstance(string name, string status) + { + Name = name; + Status = status; + } + + /// Name of the Dev Tool Portal instance. + public string Name { get; } + /// Status of the Dev Tool Portal instance. It can be Pending, Running, Succeeded, Failed, Unknown. + public string Status { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalProperties.Serialization.cs new file mode 100644 index 000000000000..f197ee5379cd --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalProperties.Serialization.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class DevToolPortalProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Public)) + { + writer.WritePropertyName("public"u8); + writer.WriteBooleanValue(Public.Value); + } + if (Optional.IsDefined(SsoProperties)) + { + writer.WritePropertyName("ssoProperties"u8); + writer.WriteObjectValue(SsoProperties); + } + if (Optional.IsDefined(Features)) + { + writer.WritePropertyName("features"u8); + writer.WriteObjectValue(Features); + } + writer.WriteEndObject(); + } + + internal static DevToolPortalProperties DeserializeDevToolPortalProperties(JsonElement element) + { + Optional provisioningState = default; + Optional resourceRequests = default; + Optional> instances = default; + Optional @public = default; + Optional uri = default; + Optional ssoProperties = default; + Optional features = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new DevToolPortalProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("resourceRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + resourceRequests = DevToolPortalResourceRequests.DeserializeDevToolPortalResourceRequests(property.Value); + continue; + } + if (property.NameEquals("instances"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DevToolPortalInstance.DeserializeDevToolPortalInstance(item)); + } + instances = array; + continue; + } + if (property.NameEquals("public"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + @public = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("url"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + uri = null; + continue; + } + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("ssoProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + ssoProperties = DevToolPortalSsoProperties.DeserializeDevToolPortalSsoProperties(property.Value); + continue; + } + if (property.NameEquals("features"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + features = DevToolPortalFeatureSettings.DeserializeDevToolPortalFeatureSettings(property.Value); + continue; + } + } + return new DevToolPortalProperties(Optional.ToNullable(provisioningState), resourceRequests.Value, Optional.ToList(instances), Optional.ToNullable(@public), uri.Value, ssoProperties.Value, features.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalProperties.cs new file mode 100644 index 000000000000..2fb9d2fa4ec0 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalProperties.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Dev Tool Portal properties payload. + public partial class DevToolPortalProperties + { + /// Initializes a new instance of DevToolPortalProperties. + public DevToolPortalProperties() + { + Instances = new ChangeTrackingList(); + } + + /// Initializes a new instance of DevToolPortalProperties. + /// State of the Dev Tool Portal. + /// The requested resource quantity for required CPU and Memory. + /// Collection of instances belong to Dev Tool Portal. + /// Indicates whether the resource exposes public endpoint. + /// URL of the resource, exposed when 'public' is true. + /// Single sign-on related configuration. + /// Settings for Dev Tool Portal. + internal DevToolPortalProperties(DevToolPortalProvisioningState? provisioningState, DevToolPortalResourceRequests resourceRequests, IReadOnlyList instances, bool? @public, Uri uri, DevToolPortalSsoProperties ssoProperties, DevToolPortalFeatureSettings features) + { + ProvisioningState = provisioningState; + ResourceRequests = resourceRequests; + Instances = instances; + Public = @public; + Uri = uri; + SsoProperties = ssoProperties; + Features = features; + } + + /// State of the Dev Tool Portal. + public DevToolPortalProvisioningState? ProvisioningState { get; } + /// The requested resource quantity for required CPU and Memory. + public DevToolPortalResourceRequests ResourceRequests { get; } + /// Collection of instances belong to Dev Tool Portal. + public IReadOnlyList Instances { get; } + /// Indicates whether the resource exposes public endpoint. + public bool? Public { get; set; } + /// URL of the resource, exposed when 'public' is true. + public Uri Uri { get; } + /// Single sign-on related configuration. + public DevToolPortalSsoProperties SsoProperties { get; set; } + /// Settings for Dev Tool Portal. + public DevToolPortalFeatureSettings Features { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalProvisioningState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalProvisioningState.cs new file mode 100644 index 000000000000..9020ed498597 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalProvisioningState.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// State of the Dev Tool Portal. + public readonly partial struct DevToolPortalProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DevToolPortalProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatingValue = "Creating"; + private const string UpdatingValue = "Updating"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string DeletingValue = "Deleting"; + private const string CanceledValue = "Canceled"; + + /// Creating. + public static DevToolPortalProvisioningState Creating { get; } = new DevToolPortalProvisioningState(CreatingValue); + /// Updating. + public static DevToolPortalProvisioningState Updating { get; } = new DevToolPortalProvisioningState(UpdatingValue); + /// Succeeded. + public static DevToolPortalProvisioningState Succeeded { get; } = new DevToolPortalProvisioningState(SucceededValue); + /// Failed. + public static DevToolPortalProvisioningState Failed { get; } = new DevToolPortalProvisioningState(FailedValue); + /// Deleting. + public static DevToolPortalProvisioningState Deleting { get; } = new DevToolPortalProvisioningState(DeletingValue); + /// Canceled. + public static DevToolPortalProvisioningState Canceled { get; } = new DevToolPortalProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(DevToolPortalProvisioningState left, DevToolPortalProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DevToolPortalProvisioningState left, DevToolPortalProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DevToolPortalProvisioningState(string value) => new DevToolPortalProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DevToolPortalProvisioningState other && Equals(other); + /// + public bool Equals(DevToolPortalProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalResourceCollection.Serialization.cs new file mode 100644 index 000000000000..b308e6ba8f89 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalResourceCollection.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class DevToolPortalResourceCollection + { + internal static DevToolPortalResourceCollection DeserializeDevToolPortalResourceCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DevToolPortalResourceData.DeserializeDevToolPortalResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new DevToolPortalResourceCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalResourceCollection.cs new file mode 100644 index 000000000000..906e70a45bf9 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalResourceCollection.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Object that includes an array of Dev Tool Portal resources and a possible link for next set. + internal partial class DevToolPortalResourceCollection + { + /// Initializes a new instance of DevToolPortalResourceCollection. + internal DevToolPortalResourceCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of DevToolPortalResourceCollection. + /// Collection of Dev Tool Portal resources. + /// + /// URL client should use to fetch the next page (per server side paging). + /// It's null for now, added for future use. + /// + internal DevToolPortalResourceCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of Dev Tool Portal resources. + public IReadOnlyList Value { get; } + /// + /// URL client should use to fetch the next page (per server side paging). + /// It's null for now, added for future use. + /// + public string NextLink { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalResourceData.Serialization.cs new file mode 100644 index 000000000000..f7d03d5f639e --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalResourceData.Serialization.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + public partial class DevToolPortalResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + + internal static DevToolPortalResourceData DeserializeDevToolPortalResourceData(JsonElement element) + { + Optional properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = DevToolPortalProperties.DeserializeDevToolPortalProperties(property.Value); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new DevToolPortalResourceData(id, name, type, systemData.Value, properties.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalResourceRequests.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalResourceRequests.Serialization.cs new file mode 100644 index 000000000000..251804e91a99 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalResourceRequests.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class DevToolPortalResourceRequests + { + internal static DevToolPortalResourceRequests DeserializeDevToolPortalResourceRequests(JsonElement element) + { + Optional cpu = default; + Optional memory = default; + Optional instanceCount = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("cpu"u8)) + { + cpu = property.Value.GetString(); + continue; + } + if (property.NameEquals("memory"u8)) + { + memory = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + instanceCount = property.Value.GetInt32(); + continue; + } + } + return new DevToolPortalResourceRequests(cpu.Value, memory.Value, Optional.ToNullable(instanceCount)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalResourceRequests.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalResourceRequests.cs new file mode 100644 index 000000000000..43ddf3e48b5f --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalResourceRequests.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// The resource quantity for required CPU and Memory of Dev Tool Portal. + public partial class DevToolPortalResourceRequests + { + /// Initializes a new instance of DevToolPortalResourceRequests. + internal DevToolPortalResourceRequests() + { + } + + /// Initializes a new instance of DevToolPortalResourceRequests. + /// Cpu quantity allocated to each Dev Tool Portal instance. 1 core can be represented by 1 or 1000m. + /// Memory quantity allocated to each Dev Tool Portal instance. 1 GB can be represented by 1Gi or 1024Mi. + /// Desired instance count of Dev Tool Portal. + internal DevToolPortalResourceRequests(string cpu, string memory, int? instanceCount) + { + Cpu = cpu; + Memory = memory; + InstanceCount = instanceCount; + } + + /// Cpu quantity allocated to each Dev Tool Portal instance. 1 core can be represented by 1 or 1000m. + public string Cpu { get; } + /// Memory quantity allocated to each Dev Tool Portal instance. 1 GB can be represented by 1Gi or 1024Mi. + public string Memory { get; } + /// Desired instance count of Dev Tool Portal. + public int? InstanceCount { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalSsoProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalSsoProperties.Serialization.cs new file mode 100644 index 000000000000..b429ba504083 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalSsoProperties.Serialization.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class DevToolPortalSsoProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Scopes)) + { + writer.WritePropertyName("scopes"u8); + writer.WriteStartArray(); + foreach (var item in Scopes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ClientId)) + { + writer.WritePropertyName("clientId"u8); + writer.WriteStringValue(ClientId); + } + if (Optional.IsDefined(ClientSecret)) + { + writer.WritePropertyName("clientSecret"u8); + writer.WriteStringValue(ClientSecret); + } + if (Optional.IsDefined(MetadataUri)) + { + writer.WritePropertyName("metadataUrl"u8); + writer.WriteStringValue(MetadataUri.AbsoluteUri); + } + writer.WriteEndObject(); + } + + internal static DevToolPortalSsoProperties DeserializeDevToolPortalSsoProperties(JsonElement element) + { + Optional> scopes = default; + Optional clientId = default; + Optional clientSecret = default; + Optional metadataUri = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("scopes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + scopes = array; + continue; + } + if (property.NameEquals("clientId"u8)) + { + clientId = property.Value.GetString(); + continue; + } + if (property.NameEquals("clientSecret"u8)) + { + clientSecret = property.Value.GetString(); + continue; + } + if (property.NameEquals("metadataUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + metadataUri = null; + continue; + } + metadataUri = new Uri(property.Value.GetString()); + continue; + } + } + return new DevToolPortalSsoProperties(Optional.ToList(scopes), clientId.Value, clientSecret.Value, metadataUri.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalSsoProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalSsoProperties.cs new file mode 100644 index 000000000000..c5561e453454 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalSsoProperties.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Single sign-on related configuration. + public partial class DevToolPortalSsoProperties + { + /// Initializes a new instance of DevToolPortalSsoProperties. + public DevToolPortalSsoProperties() + { + Scopes = new ChangeTrackingList(); + } + + /// Initializes a new instance of DevToolPortalSsoProperties. + /// It defines the specific actions applications can be allowed to do on a user's behalf. + /// The public identifier for the application. + /// The secret known only to the application and the authorization server. + /// The URI of a JSON file with generic OIDC provider configuration. + internal DevToolPortalSsoProperties(IList scopes, string clientId, string clientSecret, Uri metadataUri) + { + Scopes = scopes; + ClientId = clientId; + ClientSecret = clientSecret; + MetadataUri = metadataUri; + } + + /// It defines the specific actions applications can be allowed to do on a user's behalf. + public IList Scopes { get; } + /// The public identifier for the application. + public string ClientId { get; set; } + /// The secret known only to the application and the authorization server. + public string ClientSecret { get; set; } + /// The URI of a JSON file with generic OIDC provider configuration. + public Uri MetadataUri { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayPropertiesEnvironmentVariables.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayPropertiesEnvironmentVariables.Serialization.cs new file mode 100644 index 000000000000..7ce982bca06b --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayPropertiesEnvironmentVariables.Serialization.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class GatewayPropertiesEnvironmentVariables : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Secrets)) + { + writer.WritePropertyName("secrets"u8); + writer.WriteStartObject(); + foreach (var item in Secrets) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static GatewayPropertiesEnvironmentVariables DeserializeGatewayPropertiesEnvironmentVariables(JsonElement element) + { + Optional> properties = default; + Optional> secrets = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("secrets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + secrets = dictionary; + continue; + } + } + return new GatewayPropertiesEnvironmentVariables(Optional.ToDictionary(properties), Optional.ToDictionary(secrets)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayPropertiesEnvironmentVariables.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayPropertiesEnvironmentVariables.cs new file mode 100644 index 000000000000..8670108a3c84 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayPropertiesEnvironmentVariables.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Environment variables of Spring Cloud Gateway. + public partial class GatewayPropertiesEnvironmentVariables + { + /// Initializes a new instance of GatewayPropertiesEnvironmentVariables. + public GatewayPropertiesEnvironmentVariables() + { + Properties = new ChangeTrackingDictionary(); + Secrets = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of GatewayPropertiesEnvironmentVariables. + /// Non-sensitive properties. + /// Sensitive properties. + internal GatewayPropertiesEnvironmentVariables(IDictionary properties, IDictionary secrets) + { + Properties = properties; + Secrets = secrets; + } + + /// Non-sensitive properties. + public IDictionary Properties { get; } + /// Sensitive properties. + public IDictionary Secrets { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/HttpScaleRule.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/HttpScaleRule.Serialization.cs new file mode 100644 index 000000000000..bf77206f3323 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/HttpScaleRule.Serialization.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class HttpScaleRule : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Auth)) + { + writer.WritePropertyName("auth"u8); + writer.WriteStartArray(); + foreach (var item in Auth) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static HttpScaleRule DeserializeHttpScaleRule(JsonElement element) + { + Optional> metadata = default; + Optional> auth = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + metadata = dictionary; + continue; + } + if (property.NameEquals("auth"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ScaleRuleAuth.DeserializeScaleRuleAuth(item)); + } + auth = array; + continue; + } + } + return new HttpScaleRule(Optional.ToDictionary(metadata), Optional.ToList(auth)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/HttpScaleRule.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/HttpScaleRule.cs new file mode 100644 index 000000000000..32d79adf4f6c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/HttpScaleRule.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Azure Spring Apps App Instance Http scaling rule. + public partial class HttpScaleRule + { + /// Initializes a new instance of HttpScaleRule. + public HttpScaleRule() + { + Metadata = new ChangeTrackingDictionary(); + Auth = new ChangeTrackingList(); + } + + /// Initializes a new instance of HttpScaleRule. + /// Metadata properties to describe http scale rule. + /// Authentication secrets for the custom scale rule. + internal HttpScaleRule(IDictionary metadata, IList auth) + { + Metadata = metadata; + Auth = auth; + } + + /// Metadata properties to describe http scale rule. + public IDictionary Metadata { get; } + /// Authentication secrets for the custom scale rule. + public IList Auth { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MarketplaceResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MarketplaceResource.Serialization.cs new file mode 100644 index 000000000000..94307edc8867 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MarketplaceResource.Serialization.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class MarketplaceResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Plan)) + { + writer.WritePropertyName("plan"u8); + writer.WriteStringValue(Plan); + } + if (Optional.IsDefined(Publisher)) + { + writer.WritePropertyName("publisher"u8); + writer.WriteStringValue(Publisher); + } + if (Optional.IsDefined(Product)) + { + writer.WritePropertyName("product"u8); + writer.WriteStringValue(Product); + } + writer.WriteEndObject(); + } + + internal static MarketplaceResource DeserializeMarketplaceResource(JsonElement element) + { + Optional plan = default; + Optional publisher = default; + Optional product = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("plan"u8)) + { + plan = property.Value.GetString(); + continue; + } + if (property.NameEquals("publisher"u8)) + { + publisher = property.Value.GetString(); + continue; + } + if (property.NameEquals("product"u8)) + { + product = property.Value.GetString(); + continue; + } + } + return new MarketplaceResource(plan.Value, publisher.Value, product.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MarketplaceResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MarketplaceResource.cs new file mode 100644 index 000000000000..77ebd7ec48dc --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MarketplaceResource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Purchasing 3rd Party product for one Azure Spring Apps instance. + public partial class MarketplaceResource + { + /// Initializes a new instance of MarketplaceResource. + public MarketplaceResource() + { + } + + /// Initializes a new instance of MarketplaceResource. + /// The plan id of the 3rd Party Artifact that is being procured. + /// The publisher id of the 3rd Party Artifact that is being bought. + /// The 3rd Party artifact that is being procured. + internal MarketplaceResource(string plan, string publisher, string product) + { + Plan = plan; + Publisher = publisher; + Product = product; + } + + /// The plan id of the 3rd Party Artifact that is being procured. + public string Plan { get; set; } + /// The publisher id of the 3rd Party Artifact that is being bought. + public string Publisher { get; set; } + /// The 3rd Party artifact that is being procured. + public string Product { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorProperties.Serialization.cs new file mode 100644 index 000000000000..5ea61077a3ba --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorProperties.Serialization.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class PredefinedAcceleratorProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static PredefinedAcceleratorProperties DeserializePredefinedAcceleratorProperties(JsonElement element) + { + Optional provisioningState = default; + Optional displayName = default; + Optional description = default; + Optional iconUri = default; + Optional> acceleratorTags = default; + Optional state = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new PredefinedAcceleratorProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("iconUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + iconUri = null; + continue; + } + iconUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("acceleratorTags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + acceleratorTags = array; + continue; + } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + state = new PredefinedAcceleratorState(property.Value.GetString()); + continue; + } + } + return new PredefinedAcceleratorProperties(Optional.ToNullable(provisioningState), displayName.Value, description.Value, iconUri.Value, Optional.ToList(acceleratorTags), Optional.ToNullable(state)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorProperties.cs new file mode 100644 index 000000000000..7c1c74de8452 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorProperties.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Predefined accelerator properties payload. + public partial class PredefinedAcceleratorProperties + { + /// Initializes a new instance of PredefinedAcceleratorProperties. + public PredefinedAcceleratorProperties() + { + AcceleratorTags = new ChangeTrackingList(); + } + + /// Initializes a new instance of PredefinedAcceleratorProperties. + /// Provisioning state of the predefined accelerator. + /// + /// + /// + /// + /// State of the predefined accelerator. + internal PredefinedAcceleratorProperties(PredefinedAcceleratorProvisioningState? provisioningState, string displayName, string description, Uri iconUri, IReadOnlyList acceleratorTags, PredefinedAcceleratorState? state) + { + ProvisioningState = provisioningState; + DisplayName = displayName; + Description = description; + IconUri = iconUri; + AcceleratorTags = acceleratorTags; + State = state; + } + + /// Provisioning state of the predefined accelerator. + public PredefinedAcceleratorProvisioningState? ProvisioningState { get; } + /// Gets the display name. + public string DisplayName { get; } + /// Gets the description. + public string Description { get; } + /// Gets the icon uri. + public Uri IconUri { get; } + /// Gets the accelerator tags. + public IReadOnlyList AcceleratorTags { get; } + /// State of the predefined accelerator. + public PredefinedAcceleratorState? State { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorProvisioningState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorProvisioningState.cs new file mode 100644 index 000000000000..1eb48535cf7e --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorProvisioningState.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Provisioning state of the predefined accelerator. + public readonly partial struct PredefinedAcceleratorProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PredefinedAcceleratorProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatingValue = "Creating"; + private const string UpdatingValue = "Updating"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + + /// Creating. + public static PredefinedAcceleratorProvisioningState Creating { get; } = new PredefinedAcceleratorProvisioningState(CreatingValue); + /// Updating. + public static PredefinedAcceleratorProvisioningState Updating { get; } = new PredefinedAcceleratorProvisioningState(UpdatingValue); + /// Succeeded. + public static PredefinedAcceleratorProvisioningState Succeeded { get; } = new PredefinedAcceleratorProvisioningState(SucceededValue); + /// Failed. + public static PredefinedAcceleratorProvisioningState Failed { get; } = new PredefinedAcceleratorProvisioningState(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(PredefinedAcceleratorProvisioningState left, PredefinedAcceleratorProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PredefinedAcceleratorProvisioningState left, PredefinedAcceleratorProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PredefinedAcceleratorProvisioningState(string value) => new PredefinedAcceleratorProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PredefinedAcceleratorProvisioningState other && Equals(other); + /// + public bool Equals(PredefinedAcceleratorProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorResourceCollection.Serialization.cs new file mode 100644 index 000000000000..d69fcc93b134 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorResourceCollection.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class PredefinedAcceleratorResourceCollection + { + internal static PredefinedAcceleratorResourceCollection DeserializePredefinedAcceleratorResourceCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(PredefinedAcceleratorResourceData.DeserializePredefinedAcceleratorResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new PredefinedAcceleratorResourceCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorResourceCollection.cs new file mode 100644 index 000000000000..0ca7ef43aab0 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorResourceCollection.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// The PredefinedAcceleratorResourceCollection. + internal partial class PredefinedAcceleratorResourceCollection + { + /// Initializes a new instance of PredefinedAcceleratorResourceCollection. + internal PredefinedAcceleratorResourceCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of PredefinedAcceleratorResourceCollection. + /// + /// + internal PredefinedAcceleratorResourceCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Gets the value. + public IReadOnlyList Value { get; } + /// Gets the next link. + public string NextLink { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorResourceData.Serialization.cs new file mode 100644 index 000000000000..f3ebad4a9f06 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorResourceData.Serialization.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + public partial class PredefinedAcceleratorResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku); + } + writer.WriteEndObject(); + } + + internal static PredefinedAcceleratorResourceData DeserializePredefinedAcceleratorResourceData(JsonElement element) + { + Optional properties = default; + Optional sku = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = PredefinedAcceleratorProperties.DeserializePredefinedAcceleratorProperties(property.Value); + continue; + } + if (property.NameEquals("sku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sku = AppPlatformSku.DeserializeAppPlatformSku(property.Value); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new PredefinedAcceleratorResourceData(id, name, type, systemData.Value, properties.Value, sku.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorState.cs new file mode 100644 index 000000000000..e9c3ed5a3495 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorState.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// State of the predefined accelerator. + public readonly partial struct PredefinedAcceleratorState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PredefinedAcceleratorState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Enable the predefined accelerator. + public static PredefinedAcceleratorState Enabled { get; } = new PredefinedAcceleratorState(EnabledValue); + /// Disable the predefined accelerator. + public static PredefinedAcceleratorState Disabled { get; } = new PredefinedAcceleratorState(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(PredefinedAcceleratorState left, PredefinedAcceleratorState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PredefinedAcceleratorState left, PredefinedAcceleratorState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PredefinedAcceleratorState(string value) => new PredefinedAcceleratorState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PredefinedAcceleratorState other && Equals(other); + /// + public bool Equals(PredefinedAcceleratorState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/QueueScaleRule.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/QueueScaleRule.Serialization.cs new file mode 100644 index 000000000000..2574e6a5b4f1 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/QueueScaleRule.Serialization.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class QueueScaleRule : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(QueueName)) + { + writer.WritePropertyName("queueName"u8); + writer.WriteStringValue(QueueName); + } + if (Optional.IsDefined(QueueLength)) + { + writer.WritePropertyName("queueLength"u8); + writer.WriteNumberValue(QueueLength.Value); + } + if (Optional.IsCollectionDefined(Auth)) + { + writer.WritePropertyName("auth"u8); + writer.WriteStartArray(); + foreach (var item in Auth) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static QueueScaleRule DeserializeQueueScaleRule(JsonElement element) + { + Optional queueName = default; + Optional queueLength = default; + Optional> auth = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("queueName"u8)) + { + queueName = property.Value.GetString(); + continue; + } + if (property.NameEquals("queueLength"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + queueLength = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("auth"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ScaleRuleAuth.DeserializeScaleRuleAuth(item)); + } + auth = array; + continue; + } + } + return new QueueScaleRule(queueName.Value, Optional.ToNullable(queueLength), Optional.ToList(auth)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/QueueScaleRule.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/QueueScaleRule.cs new file mode 100644 index 000000000000..37bbd9068d07 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/QueueScaleRule.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Azure Spring Apps App Instance Azure Queue based scaling rule. + public partial class QueueScaleRule + { + /// Initializes a new instance of QueueScaleRule. + public QueueScaleRule() + { + Auth = new ChangeTrackingList(); + } + + /// Initializes a new instance of QueueScaleRule. + /// Queue name. + /// Queue length. + /// Authentication secrets for the queue scale rule. + internal QueueScaleRule(string queueName, int? queueLength, IList auth) + { + QueueName = queueName; + QueueLength = queueLength; + Auth = auth; + } + + /// Queue name. + public string QueueName { get; set; } + /// Queue length. + public int? QueueLength { get; set; } + /// Authentication secrets for the queue scale rule. + public IList Auth { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Scale.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Scale.Serialization.cs new file mode 100644 index 000000000000..67f7c439bf0b --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Scale.Serialization.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class Scale : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(MinReplicas)) + { + writer.WritePropertyName("minReplicas"u8); + writer.WriteNumberValue(MinReplicas.Value); + } + if (Optional.IsDefined(MaxReplicas)) + { + writer.WritePropertyName("maxReplicas"u8); + writer.WriteNumberValue(MaxReplicas.Value); + } + if (Optional.IsCollectionDefined(Rules)) + { + writer.WritePropertyName("rules"u8); + writer.WriteStartArray(); + foreach (var item in Rules) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static Scale DeserializeScale(JsonElement element) + { + Optional minReplicas = default; + Optional maxReplicas = default; + Optional> rules = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("minReplicas"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + minReplicas = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxReplicas"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + maxReplicas = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("rules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ScaleRule.DeserializeScaleRule(item)); + } + rules = array; + continue; + } + } + return new Scale(Optional.ToNullable(minReplicas), Optional.ToNullable(maxReplicas), Optional.ToList(rules)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Scale.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Scale.cs new file mode 100644 index 000000000000..8bdcf460394b --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Scale.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Azure Spring Apps scaling configurations. + public partial class Scale + { + /// Initializes a new instance of Scale. + public Scale() + { + Rules = new ChangeTrackingList(); + } + + /// Initializes a new instance of Scale. + /// Optional. Minimum number of container replicas. + /// Optional. Maximum number of container replicas. Defaults to 10 if not set. + /// Scaling rules. + internal Scale(int? minReplicas, int? maxReplicas, IList rules) + { + MinReplicas = minReplicas; + MaxReplicas = maxReplicas; + Rules = rules; + } + + /// Optional. Minimum number of container replicas. + public int? MinReplicas { get; set; } + /// Optional. Maximum number of container replicas. Defaults to 10 if not set. + public int? MaxReplicas { get; set; } + /// Scaling rules. + public IList Rules { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ScaleRule.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ScaleRule.Serialization.cs new file mode 100644 index 000000000000..1f56ca047383 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ScaleRule.Serialization.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class ScaleRule : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(AzureQueue)) + { + writer.WritePropertyName("azureQueue"u8); + writer.WriteObjectValue(AzureQueue); + } + if (Optional.IsDefined(Custom)) + { + writer.WritePropertyName("custom"u8); + writer.WriteObjectValue(Custom); + } + if (Optional.IsDefined(Http)) + { + writer.WritePropertyName("http"u8); + writer.WriteObjectValue(Http); + } + if (Optional.IsDefined(Tcp)) + { + writer.WritePropertyName("tcp"u8); + writer.WriteObjectValue(Tcp); + } + writer.WriteEndObject(); + } + + internal static ScaleRule DeserializeScaleRule(JsonElement element) + { + Optional name = default; + Optional azureQueue = default; + Optional custom = default; + Optional http = default; + Optional tcp = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("azureQueue"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + azureQueue = QueueScaleRule.DeserializeQueueScaleRule(property.Value); + continue; + } + if (property.NameEquals("custom"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + custom = CustomScaleRule.DeserializeCustomScaleRule(property.Value); + continue; + } + if (property.NameEquals("http"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + http = HttpScaleRule.DeserializeHttpScaleRule(property.Value); + continue; + } + if (property.NameEquals("tcp"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + tcp = TcpScaleRule.DeserializeTcpScaleRule(property.Value); + continue; + } + } + return new ScaleRule(name.Value, azureQueue.Value, custom.Value, http.Value, tcp.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ScaleRule.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ScaleRule.cs new file mode 100644 index 000000000000..934b6c441821 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ScaleRule.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Azure Spring Apps App Instance scaling rule. + public partial class ScaleRule + { + /// Initializes a new instance of ScaleRule. + public ScaleRule() + { + } + + /// Initializes a new instance of ScaleRule. + /// Scale Rule Name. + /// Azure Queue based scaling. + /// Custom scale rule. + /// HTTP requests based scaling. + /// Tcp requests based scaling. + internal ScaleRule(string name, QueueScaleRule azureQueue, CustomScaleRule custom, HttpScaleRule http, TcpScaleRule tcp) + { + Name = name; + AzureQueue = azureQueue; + Custom = custom; + Http = http; + Tcp = tcp; + } + + /// Scale Rule Name. + public string Name { get; set; } + /// Azure Queue based scaling. + public QueueScaleRule AzureQueue { get; set; } + /// Custom scale rule. + public CustomScaleRule Custom { get; set; } + /// HTTP requests based scaling. + public HttpScaleRule Http { get; set; } + /// Tcp requests based scaling. + public TcpScaleRule Tcp { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ScaleRuleAuth.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ScaleRuleAuth.Serialization.cs new file mode 100644 index 000000000000..3db389068610 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ScaleRuleAuth.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class ScaleRuleAuth : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SecretRef)) + { + writer.WritePropertyName("secretRef"u8); + writer.WriteStringValue(SecretRef); + } + if (Optional.IsDefined(TriggerParameter)) + { + writer.WritePropertyName("triggerParameter"u8); + writer.WriteStringValue(TriggerParameter); + } + writer.WriteEndObject(); + } + + internal static ScaleRuleAuth DeserializeScaleRuleAuth(JsonElement element) + { + Optional secretRef = default; + Optional triggerParameter = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("secretRef"u8)) + { + secretRef = property.Value.GetString(); + continue; + } + if (property.NameEquals("triggerParameter"u8)) + { + triggerParameter = property.Value.GetString(); + continue; + } + } + return new ScaleRuleAuth(secretRef.Value, triggerParameter.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ScaleRuleAuth.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ScaleRuleAuth.cs new file mode 100644 index 000000000000..2c3b429d3305 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ScaleRuleAuth.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Auth Secrets for Azure Spring Apps App Instance Scale Rule. + public partial class ScaleRuleAuth + { + /// Initializes a new instance of ScaleRuleAuth. + public ScaleRuleAuth() + { + } + + /// Initializes a new instance of ScaleRuleAuth. + /// Name of the Azure Spring Apps App Instance secret from which to pull the auth params. + /// Trigger Parameter that uses the secret. + internal ScaleRuleAuth(string secretRef, string triggerParameter) + { + SecretRef = secretRef; + TriggerParameter = triggerParameter; + } + + /// Name of the Azure Spring Apps App Instance secret from which to pull the auth params. + public string SecretRef { get; set; } + /// Trigger Parameter that uses the secret. + public string TriggerParameter { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Secret.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Secret.Serialization.cs new file mode 100644 index 000000000000..48d53c00cb4b --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Secret.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class Secret : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + writer.WriteEndObject(); + } + + internal static Secret DeserializeSecret(JsonElement element) + { + Optional name = default; + Optional value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + } + return new Secret(name.Value, value.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Secret.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Secret.cs new file mode 100644 index 000000000000..0e18d81c7d80 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Secret.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Secret definition. + public partial class Secret + { + /// Initializes a new instance of Secret. + public Secret() + { + } + + /// Initializes a new instance of Secret. + /// Secret Name. + /// Secret Value. + internal Secret(string name, string value) + { + Name = name; + Value = value; + } + + /// Secret Name. + public string Name { get; set; } + /// Secret Value. + public string Value { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TcpScaleRule.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TcpScaleRule.Serialization.cs new file mode 100644 index 000000000000..e0b59db2ea28 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TcpScaleRule.Serialization.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class TcpScaleRule : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Auth)) + { + writer.WritePropertyName("auth"u8); + writer.WriteStartArray(); + foreach (var item in Auth) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static TcpScaleRule DeserializeTcpScaleRule(JsonElement element) + { + Optional> metadata = default; + Optional> auth = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + metadata = dictionary; + continue; + } + if (property.NameEquals("auth"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ScaleRuleAuth.DeserializeScaleRuleAuth(item)); + } + auth = array; + continue; + } + } + return new TcpScaleRule(Optional.ToDictionary(metadata), Optional.ToList(auth)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TcpScaleRule.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TcpScaleRule.cs new file mode 100644 index 000000000000..739958c08d7f --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TcpScaleRule.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Azure Spring Apps App Instance Tcp scaling rule. + public partial class TcpScaleRule + { + /// Initializes a new instance of TcpScaleRule. + public TcpScaleRule() + { + Metadata = new ChangeTrackingDictionary(); + Auth = new ChangeTrackingList(); + } + + /// Initializes a new instance of TcpScaleRule. + /// Metadata properties to describe tcp scale rule. + /// Authentication secrets for the tcp scale rule. + internal TcpScaleRule(IDictionary metadata, IList auth) + { + Metadata = metadata; + Auth = auth; + } + + /// Metadata properties to describe tcp scale rule. + public IDictionary Metadata { get; } + /// Authentication secrets for the tcp scale rule. + public IList Auth { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UnknownAcceleratorAuthSetting.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UnknownAcceleratorAuthSetting.Serialization.cs new file mode 100644 index 000000000000..f33acd0eed64 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UnknownAcceleratorAuthSetting.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class UnknownAcceleratorAuthSetting : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("authType"u8); + writer.WriteStringValue(AuthType); + writer.WriteEndObject(); + } + + internal static UnknownAcceleratorAuthSetting DeserializeUnknownAcceleratorAuthSetting(JsonElement element) + { + string authType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("authType"u8)) + { + authType = property.Value.GetString(); + continue; + } + } + return new UnknownAcceleratorAuthSetting(authType); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UnknownAcceleratorAuthSetting.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UnknownAcceleratorAuthSetting.cs new file mode 100644 index 000000000000..40b0348d7d4c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UnknownAcceleratorAuthSetting.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// The UnknownAcceleratorAuthSetting. + internal partial class UnknownAcceleratorAuthSetting : AcceleratorAuthSetting + { + /// Initializes a new instance of UnknownAcceleratorAuthSetting. + /// The type of the auth setting. + internal UnknownAcceleratorAuthSetting(string authType) : base(authType) + { + AuthType = authType ?? "Unknown"; + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UnknownCustomPersistentDiskProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UnknownCustomPersistentDiskProperties.Serialization.cs index 91fbf6d5d7c3..f23716b4bca7 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UnknownCustomPersistentDiskProperties.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UnknownCustomPersistentDiskProperties.Serialization.cs @@ -25,6 +25,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("readOnly"u8); writer.WriteBooleanValue(IsReadOnly.Value); } + if (Optional.IsDefined(EnableSubPath)) + { + writer.WritePropertyName("enableSubPath"u8); + writer.WriteBooleanValue(EnableSubPath.Value); + } if (Optional.IsCollectionDefined(MountOptions)) { writer.WritePropertyName("mountOptions"u8); @@ -43,6 +48,7 @@ internal static UnknownCustomPersistentDiskProperties DeserializeUnknownCustomPe UnderlyingResourceType type = "Unknown"; string mountPath = default; Optional readOnly = default; + Optional enableSubPath = default; Optional> mountOptions = default; foreach (var property in element.EnumerateObject()) { @@ -66,6 +72,16 @@ internal static UnknownCustomPersistentDiskProperties DeserializeUnknownCustomPe readOnly = property.Value.GetBoolean(); continue; } + if (property.NameEquals("enableSubPath"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + enableSubPath = property.Value.GetBoolean(); + continue; + } if (property.NameEquals("mountOptions"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -82,7 +98,7 @@ internal static UnknownCustomPersistentDiskProperties DeserializeUnknownCustomPe continue; } } - return new UnknownCustomPersistentDiskProperties(type, mountPath, Optional.ToNullable(readOnly), Optional.ToList(mountOptions)); + return new UnknownCustomPersistentDiskProperties(type, mountPath, Optional.ToNullable(readOnly), Optional.ToNullable(enableSubPath), Optional.ToList(mountOptions)); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UnknownCustomPersistentDiskProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UnknownCustomPersistentDiskProperties.cs index 7ca17a92f1fd..5e3d74f4f7c5 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UnknownCustomPersistentDiskProperties.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UnknownCustomPersistentDiskProperties.cs @@ -16,8 +16,9 @@ internal partial class UnknownCustomPersistentDiskProperties : AppCustomPersiste /// The type of the underlying resource to mount as a persistent disk. /// The mount path of the persistent disk. /// Indicates whether the persistent disk is a readOnly one. + /// If set to true, it will create and mount a dedicated directory for every individual app instance. /// These are the mount options for a persistent disk. - internal UnknownCustomPersistentDiskProperties(UnderlyingResourceType underlyingResourceType, string mountPath, bool? isReadOnly, IList mountOptions) : base(underlyingResourceType, mountPath, isReadOnly, mountOptions) + internal UnknownCustomPersistentDiskProperties(UnderlyingResourceType underlyingResourceType, string mountPath, bool? isReadOnly, bool? enableSubPath, IList mountOptions) : base(underlyingResourceType, mountPath, isReadOnly, enableSubPath, mountOptions) { UnderlyingResourceType = underlyingResourceType; } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/PredefinedAcceleratorResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/PredefinedAcceleratorResource.cs new file mode 100644 index 000000000000..4ed8cba4becb --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/PredefinedAcceleratorResource.cs @@ -0,0 +1,289 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.AppPlatform +{ + /// + /// A Class representing a PredefinedAcceleratorResource along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetPredefinedAcceleratorResource method. + /// Otherwise you can get one from its parent resource using the GetPredefinedAcceleratorResource method. + /// + public partial class PredefinedAcceleratorResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, string predefinedAcceleratorName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/predefinedAccelerators/{predefinedAcceleratorName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _predefinedAcceleratorResourcePredefinedAcceleratorsClientDiagnostics; + private readonly PredefinedAcceleratorsRestOperations _predefinedAcceleratorResourcePredefinedAcceleratorsRestClient; + private readonly PredefinedAcceleratorResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected PredefinedAcceleratorResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal PredefinedAcceleratorResource(ArmClient client, PredefinedAcceleratorResourceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal PredefinedAcceleratorResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _predefinedAcceleratorResourcePredefinedAcceleratorsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string predefinedAcceleratorResourcePredefinedAcceleratorsApiVersion); + _predefinedAcceleratorResourcePredefinedAcceleratorsRestClient = new PredefinedAcceleratorsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, predefinedAcceleratorResourcePredefinedAcceleratorsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/applicationAccelerators/predefinedAccelerators"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual PredefinedAcceleratorResourceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get the predefined accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/predefinedAccelerators/{predefinedAcceleratorName} + /// + /// + /// Operation Id + /// PredefinedAccelerators_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _predefinedAcceleratorResourcePredefinedAcceleratorsClientDiagnostics.CreateScope("PredefinedAcceleratorResource.Get"); + scope.Start(); + try + { + var response = await _predefinedAcceleratorResourcePredefinedAcceleratorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PredefinedAcceleratorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the predefined accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/predefinedAccelerators/{predefinedAcceleratorName} + /// + /// + /// Operation Id + /// PredefinedAccelerators_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _predefinedAcceleratorResourcePredefinedAcceleratorsClientDiagnostics.CreateScope("PredefinedAcceleratorResource.Get"); + scope.Start(); + try + { + var response = _predefinedAcceleratorResourcePredefinedAcceleratorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PredefinedAcceleratorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Disable predefined accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/predefinedAccelerators/{predefinedAcceleratorName}/disable + /// + /// + /// Operation Id + /// PredefinedAccelerators_Disable + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DisableAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _predefinedAcceleratorResourcePredefinedAcceleratorsClientDiagnostics.CreateScope("PredefinedAcceleratorResource.Disable"); + scope.Start(); + try + { + var response = await _predefinedAcceleratorResourcePredefinedAcceleratorsRestClient.DisableAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_predefinedAcceleratorResourcePredefinedAcceleratorsClientDiagnostics, Pipeline, _predefinedAcceleratorResourcePredefinedAcceleratorsRestClient.CreateDisableRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Disable predefined accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/predefinedAccelerators/{predefinedAcceleratorName}/disable + /// + /// + /// Operation Id + /// PredefinedAccelerators_Disable + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Disable(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _predefinedAcceleratorResourcePredefinedAcceleratorsClientDiagnostics.CreateScope("PredefinedAcceleratorResource.Disable"); + scope.Start(); + try + { + var response = _predefinedAcceleratorResourcePredefinedAcceleratorsRestClient.Disable(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_predefinedAcceleratorResourcePredefinedAcceleratorsClientDiagnostics, Pipeline, _predefinedAcceleratorResourcePredefinedAcceleratorsRestClient.CreateDisableRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Enable predefined accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/predefinedAccelerators/{predefinedAcceleratorName}/enable + /// + /// + /// Operation Id + /// PredefinedAccelerators_Enable + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task EnableAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _predefinedAcceleratorResourcePredefinedAcceleratorsClientDiagnostics.CreateScope("PredefinedAcceleratorResource.Enable"); + scope.Start(); + try + { + var response = await _predefinedAcceleratorResourcePredefinedAcceleratorsRestClient.EnableAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_predefinedAcceleratorResourcePredefinedAcceleratorsClientDiagnostics, Pipeline, _predefinedAcceleratorResourcePredefinedAcceleratorsRestClient.CreateEnableRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Enable predefined accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/predefinedAccelerators/{predefinedAcceleratorName}/enable + /// + /// + /// Operation Id + /// PredefinedAccelerators_Enable + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Enable(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _predefinedAcceleratorResourcePredefinedAcceleratorsClientDiagnostics.CreateScope("PredefinedAcceleratorResource.Enable"); + scope.Start(); + try + { + var response = _predefinedAcceleratorResourcePredefinedAcceleratorsRestClient.Enable(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_predefinedAcceleratorResourcePredefinedAcceleratorsClientDiagnostics, Pipeline, _predefinedAcceleratorResourcePredefinedAcceleratorsRestClient.CreateEnableRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/PredefinedAcceleratorResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/PredefinedAcceleratorResourceCollection.cs new file mode 100644 index 000000000000..b48703775435 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/PredefinedAcceleratorResourceCollection.cs @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.AppPlatform +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetPredefinedAcceleratorResources method from an instance of . + /// + public partial class PredefinedAcceleratorResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _predefinedAcceleratorResourcePredefinedAcceleratorsClientDiagnostics; + private readonly PredefinedAcceleratorsRestOperations _predefinedAcceleratorResourcePredefinedAcceleratorsRestClient; + + /// Initializes a new instance of the class for mocking. + protected PredefinedAcceleratorResourceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal PredefinedAcceleratorResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _predefinedAcceleratorResourcePredefinedAcceleratorsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", PredefinedAcceleratorResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(PredefinedAcceleratorResource.ResourceType, out string predefinedAcceleratorResourcePredefinedAcceleratorsApiVersion); + _predefinedAcceleratorResourcePredefinedAcceleratorsRestClient = new PredefinedAcceleratorsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, predefinedAcceleratorResourcePredefinedAcceleratorsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ApplicationAcceleratorResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ApplicationAcceleratorResource.ResourceType), nameof(id)); + } + + /// + /// Get the predefined accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/predefinedAccelerators/{predefinedAcceleratorName} + /// + /// + /// Operation Id + /// PredefinedAccelerators_Get + /// + /// + /// + /// The name of the predefined accelerator. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string predefinedAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(predefinedAcceleratorName, nameof(predefinedAcceleratorName)); + + using var scope = _predefinedAcceleratorResourcePredefinedAcceleratorsClientDiagnostics.CreateScope("PredefinedAcceleratorResourceCollection.Get"); + scope.Start(); + try + { + var response = await _predefinedAcceleratorResourcePredefinedAcceleratorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, predefinedAcceleratorName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PredefinedAcceleratorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the predefined accelerator. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/predefinedAccelerators/{predefinedAcceleratorName} + /// + /// + /// Operation Id + /// PredefinedAccelerators_Get + /// + /// + /// + /// The name of the predefined accelerator. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string predefinedAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(predefinedAcceleratorName, nameof(predefinedAcceleratorName)); + + using var scope = _predefinedAcceleratorResourcePredefinedAcceleratorsClientDiagnostics.CreateScope("PredefinedAcceleratorResourceCollection.Get"); + scope.Start(); + try + { + var response = _predefinedAcceleratorResourcePredefinedAcceleratorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, predefinedAcceleratorName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PredefinedAcceleratorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Handle requests to list all predefined accelerators. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/predefinedAccelerators + /// + /// + /// Operation Id + /// PredefinedAccelerators_List + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _predefinedAcceleratorResourcePredefinedAcceleratorsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _predefinedAcceleratorResourcePredefinedAcceleratorsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PredefinedAcceleratorResource(Client, PredefinedAcceleratorResourceData.DeserializePredefinedAcceleratorResourceData(e)), _predefinedAcceleratorResourcePredefinedAcceleratorsClientDiagnostics, Pipeline, "PredefinedAcceleratorResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Handle requests to list all predefined accelerators. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/predefinedAccelerators + /// + /// + /// Operation Id + /// PredefinedAccelerators_List + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _predefinedAcceleratorResourcePredefinedAcceleratorsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _predefinedAcceleratorResourcePredefinedAcceleratorsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PredefinedAcceleratorResource(Client, PredefinedAcceleratorResourceData.DeserializePredefinedAcceleratorResourceData(e)), _predefinedAcceleratorResourcePredefinedAcceleratorsClientDiagnostics, Pipeline, "PredefinedAcceleratorResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/predefinedAccelerators/{predefinedAcceleratorName} + /// + /// + /// Operation Id + /// PredefinedAccelerators_Get + /// + /// + /// + /// The name of the predefined accelerator. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string predefinedAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(predefinedAcceleratorName, nameof(predefinedAcceleratorName)); + + using var scope = _predefinedAcceleratorResourcePredefinedAcceleratorsClientDiagnostics.CreateScope("PredefinedAcceleratorResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _predefinedAcceleratorResourcePredefinedAcceleratorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, predefinedAcceleratorName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/predefinedAccelerators/{predefinedAcceleratorName} + /// + /// + /// Operation Id + /// PredefinedAccelerators_Get + /// + /// + /// + /// The name of the predefined accelerator. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string predefinedAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(predefinedAcceleratorName, nameof(predefinedAcceleratorName)); + + using var scope = _predefinedAcceleratorResourcePredefinedAcceleratorsClientDiagnostics.CreateScope("PredefinedAcceleratorResourceCollection.Exists"); + scope.Start(); + try + { + var response = _predefinedAcceleratorResourcePredefinedAcceleratorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, predefinedAcceleratorName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/PredefinedAcceleratorResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/PredefinedAcceleratorResourceData.cs new file mode 100644 index 000000000000..d8bdd52f127c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/PredefinedAcceleratorResourceData.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class representing the PredefinedAcceleratorResource data model. + public partial class PredefinedAcceleratorResourceData : ResourceData + { + /// Initializes a new instance of PredefinedAcceleratorResourceData. + public PredefinedAcceleratorResourceData() + { + } + + /// Initializes a new instance of PredefinedAcceleratorResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Predefined accelerator properties payload. + /// Sku of the predefined accelerator resource. + internal PredefinedAcceleratorResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, PredefinedAcceleratorProperties properties, AppPlatformSku sku) : base(id, name, resourceType, systemData) + { + Properties = properties; + Sku = sku; + } + + /// Predefined accelerator properties payload. + public PredefinedAcceleratorProperties Properties { get; set; } + /// Sku of the predefined accelerator resource. + public AppPlatformSku Sku { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApiPortalCustomDomainsRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApiPortalCustomDomainsRestOperations.cs index 0ea6335243d0..a763910d7fd4 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApiPortalCustomDomainsRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApiPortalCustomDomainsRestOperations.cs @@ -33,7 +33,7 @@ public ApiPortalCustomDomainsRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-12-01"; + _apiVersion = apiVersion ?? "2023-01-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApiPortalsRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApiPortalsRestOperations.cs index d6c8c3917ed4..6d593a1c97fa 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApiPortalsRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApiPortalsRestOperations.cs @@ -33,7 +33,7 @@ public ApiPortalsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-12-01"; + _apiVersion = apiVersion ?? "2023-01-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApplicationAcceleratorsRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApplicationAcceleratorsRestOperations.cs new file mode 100644 index 000000000000..9839fc968c53 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApplicationAcceleratorsRestOperations.cs @@ -0,0 +1,445 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppPlatform.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + internal partial class ApplicationAcceleratorsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ApplicationAcceleratorsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ApplicationAcceleratorsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-01-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string serviceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AppPlatform/Spring/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/applicationAccelerators", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Handle requests to list all application accelerator. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.ApplicationAcceleratorResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.ApplicationAcceleratorResourceCollection.DeserializeApplicationAcceleratorResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Handle requests to list all application accelerator. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.ApplicationAcceleratorResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.ApplicationAcceleratorResourceCollection.DeserializeApplicationAcceleratorResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AppPlatform/Spring/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/applicationAccelerators/", false); + uri.AppendPath(applicationAcceleratorName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the application accelerator. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ApplicationAcceleratorResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ApplicationAcceleratorResourceData.DeserializeApplicationAcceleratorResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ApplicationAcceleratorResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the application accelerator. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ApplicationAcceleratorResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ApplicationAcceleratorResourceData.DeserializeApplicationAcceleratorResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ApplicationAcceleratorResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, ApplicationAcceleratorResourceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AppPlatform/Spring/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/applicationAccelerators/", false); + uri.AppendPath(applicationAcceleratorName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update the application accelerator. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The application accelerator for the create or update operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, ApplicationAcceleratorResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update the application accelerator. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The application accelerator for the create or update operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, ApplicationAcceleratorResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AppPlatform/Spring/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/applicationAccelerators/", false); + uri.AppendPath(applicationAcceleratorName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete the application accelerator. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete the application accelerator. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Handle requests to list all application accelerator. + /// The URL to the next page of results. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.ApplicationAcceleratorResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.ApplicationAcceleratorResourceCollection.DeserializeApplicationAcceleratorResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Handle requests to list all application accelerator. + /// The URL to the next page of results. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.ApplicationAcceleratorResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.ApplicationAcceleratorResourceCollection.DeserializeApplicationAcceleratorResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApplicationLiveViewsRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApplicationLiveViewsRestOperations.cs new file mode 100644 index 000000000000..2621dab3f289 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApplicationLiveViewsRestOperations.cs @@ -0,0 +1,445 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppPlatform.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + internal partial class ApplicationLiveViewsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ApplicationLiveViewsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ApplicationLiveViewsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-01-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string serviceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AppPlatform/Spring/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/applicationLiveViews", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Handles requests to list all resources in a Service. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.ApplicationLiveViewResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.ApplicationLiveViewResourceCollection.DeserializeApplicationLiveViewResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Handles requests to list all resources in a Service. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.ApplicationLiveViewResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.ApplicationLiveViewResourceCollection.DeserializeApplicationLiveViewResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string applicationLiveViewName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AppPlatform/Spring/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/applicationLiveViews/", false); + uri.AppendPath(applicationLiveViewName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the Application Live and its properties. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of Application Live View. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string applicationLiveViewName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationLiveViewName, nameof(applicationLiveViewName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, applicationLiveViewName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ApplicationLiveViewResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ApplicationLiveViewResourceData.DeserializeApplicationLiveViewResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ApplicationLiveViewResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the Application Live and its properties. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of Application Live View. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string applicationLiveViewName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationLiveViewName, nameof(applicationLiveViewName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, applicationLiveViewName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ApplicationLiveViewResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ApplicationLiveViewResourceData.DeserializeApplicationLiveViewResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ApplicationLiveViewResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string applicationLiveViewName, ApplicationLiveViewResourceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AppPlatform/Spring/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/applicationLiveViews/", false); + uri.AppendPath(applicationLiveViewName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create the default Application Live View or update the existing Application Live View. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of Application Live View. + /// Parameters for the update operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string applicationLiveViewName, ApplicationLiveViewResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationLiveViewName, nameof(applicationLiveViewName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, applicationLiveViewName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create the default Application Live View or update the existing Application Live View. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of Application Live View. + /// Parameters for the update operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string applicationLiveViewName, ApplicationLiveViewResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationLiveViewName, nameof(applicationLiveViewName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, applicationLiveViewName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string applicationLiveViewName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AppPlatform/Spring/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/applicationLiveViews/", false); + uri.AppendPath(applicationLiveViewName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Disable the default Application Live View. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of Application Live View. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string applicationLiveViewName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationLiveViewName, nameof(applicationLiveViewName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, applicationLiveViewName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Disable the default Application Live View. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of Application Live View. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string applicationLiveViewName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationLiveViewName, nameof(applicationLiveViewName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, applicationLiveViewName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Handles requests to list all resources in a Service. + /// The URL to the next page of results. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.ApplicationLiveViewResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.ApplicationLiveViewResourceCollection.DeserializeApplicationLiveViewResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Handles requests to list all resources in a Service. + /// The URL to the next page of results. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.ApplicationLiveViewResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.ApplicationLiveViewResourceCollection.DeserializeApplicationLiveViewResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/AppsRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/AppsRestOperations.cs index 160d692a60dc..237ce81ffd3b 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/AppsRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/AppsRestOperations.cs @@ -33,7 +33,7 @@ public AppsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpo { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-12-01"; + _apiVersion = apiVersion ?? "2023-01-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BindingsRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BindingsRestOperations.cs index 672044b30b04..b7d9d7878699 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BindingsRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BindingsRestOperations.cs @@ -33,7 +33,7 @@ public BindingsRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-12-01"; + _apiVersion = apiVersion ?? "2023-01-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceAgentPoolRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceAgentPoolRestOperations.cs index 2254863cc721..bb96f402d702 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceAgentPoolRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceAgentPoolRestOperations.cs @@ -33,7 +33,7 @@ public BuildServiceAgentPoolRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-12-01"; + _apiVersion = apiVersion ?? "2023-01-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceBuilderRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceBuilderRestOperations.cs index 56e94fb3cab1..220ed9010b4e 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceBuilderRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceBuilderRestOperations.cs @@ -33,7 +33,7 @@ public BuildServiceBuilderRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-12-01"; + _apiVersion = apiVersion ?? "2023-01-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceRestOperations.cs index 9240eab73347..27f426bfc607 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceRestOperations.cs @@ -33,7 +33,7 @@ public BuildServiceRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-12-01"; + _apiVersion = apiVersion ?? "2023-01-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildpackBindingRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildpackBindingRestOperations.cs index 638802ed4951..ec33614dc846 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildpackBindingRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildpackBindingRestOperations.cs @@ -33,10 +33,89 @@ public BuildpackBindingRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-12-01"; + _apiVersion = apiVersion ?? "2023-01-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } + internal HttpMessage CreateListForClusterRequest(string subscriptionId, string resourceGroupName, string serviceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AppPlatform/Spring/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/buildpackBindings", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get collection of buildpack bindings under all builders. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListForClusterAsync(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListForClusterRequest(subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BuildpackBindingResourceList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = BuildpackBindingResourceList.DeserializeBuildpackBindingResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get collection of buildpack bindings under all builders. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListForCluster(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListForClusterRequest(subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BuildpackBindingResourceList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = BuildpackBindingResourceList.DeserializeBuildpackBindingResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string builderName, string buildpackBindingName) { var message = _pipeline.CreateMessage(); @@ -414,6 +493,82 @@ public Response List(string subscriptionId, string } } + internal HttpMessage CreateListForClusterNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get collection of buildpack bindings under all builders. + /// The URL to the next page of results. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListForClusterNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListForClusterNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BuildpackBindingResourceList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = BuildpackBindingResourceList.DeserializeBuildpackBindingResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get collection of buildpack bindings under all builders. + /// The URL to the next page of results. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListForClusterNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListForClusterNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BuildpackBindingResourceList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = BuildpackBindingResourceList.DeserializeBuildpackBindingResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string builderName) { var message = _pipeline.CreateMessage(); diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/CertificatesRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/CertificatesRestOperations.cs index 22c10796a43f..82ff1ef07f04 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/CertificatesRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/CertificatesRestOperations.cs @@ -33,7 +33,7 @@ public CertificatesRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-12-01"; + _apiVersion = apiVersion ?? "2023-01-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ConfigServersRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ConfigServersRestOperations.cs index 6776bacd8b3a..1fab1f3d8970 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ConfigServersRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ConfigServersRestOperations.cs @@ -33,7 +33,7 @@ public ConfigServersRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-12-01"; + _apiVersion = apiVersion ?? "2023-01-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ConfigurationServicesRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ConfigurationServicesRestOperations.cs index 258c4f094095..14035520d543 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ConfigurationServicesRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ConfigurationServicesRestOperations.cs @@ -33,7 +33,7 @@ public ConfigurationServicesRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-12-01"; + _apiVersion = apiVersion ?? "2023-01-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/CustomDomainsRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/CustomDomainsRestOperations.cs index f27e49a857e6..c53faafb191c 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/CustomDomainsRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/CustomDomainsRestOperations.cs @@ -33,7 +33,7 @@ public CustomDomainsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-12-01"; + _apiVersion = apiVersion ?? "2023-01-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/CustomizedAcceleratorsRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/CustomizedAcceleratorsRestOperations.cs new file mode 100644 index 000000000000..01487318f56c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/CustomizedAcceleratorsRestOperations.cs @@ -0,0 +1,576 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppPlatform.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + internal partial class CustomizedAcceleratorsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of CustomizedAcceleratorsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public CustomizedAcceleratorsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-01-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AppPlatform/Spring/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/applicationAccelerators/", false); + uri.AppendPath(applicationAcceleratorName, true); + uri.AppendPath("/customizedAccelerators", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Handle requests to list all customized accelerators. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.CustomizedAcceleratorResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.CustomizedAcceleratorResourceCollection.DeserializeCustomizedAcceleratorResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Handle requests to list all customized accelerators. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.CustomizedAcceleratorResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.CustomizedAcceleratorResourceCollection.DeserializeCustomizedAcceleratorResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, string customizedAcceleratorName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AppPlatform/Spring/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/applicationAccelerators/", false); + uri.AppendPath(applicationAcceleratorName, true); + uri.AppendPath("/customizedAccelerators/", false); + uri.AppendPath(customizedAcceleratorName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the customized accelerator. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The name of the customized accelerator. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, string customizedAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + Argument.AssertNotNullOrEmpty(customizedAcceleratorName, nameof(customizedAcceleratorName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CustomizedAcceleratorResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CustomizedAcceleratorResourceData.DeserializeCustomizedAcceleratorResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((CustomizedAcceleratorResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the customized accelerator. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The name of the customized accelerator. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, string customizedAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + Argument.AssertNotNullOrEmpty(customizedAcceleratorName, nameof(customizedAcceleratorName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CustomizedAcceleratorResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CustomizedAcceleratorResourceData.DeserializeCustomizedAcceleratorResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((CustomizedAcceleratorResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, string customizedAcceleratorName, CustomizedAcceleratorResourceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AppPlatform/Spring/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/applicationAccelerators/", false); + uri.AppendPath(applicationAcceleratorName, true); + uri.AppendPath("/customizedAccelerators/", false); + uri.AppendPath(customizedAcceleratorName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update the customized accelerator. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The name of the customized accelerator. + /// The customized accelerator for the create or update operation. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, string customizedAcceleratorName, CustomizedAcceleratorResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + Argument.AssertNotNullOrEmpty(customizedAcceleratorName, nameof(customizedAcceleratorName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update the customized accelerator. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The name of the customized accelerator. + /// The customized accelerator for the create or update operation. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, string customizedAcceleratorName, CustomizedAcceleratorResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + Argument.AssertNotNullOrEmpty(customizedAcceleratorName, nameof(customizedAcceleratorName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, string customizedAcceleratorName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AppPlatform/Spring/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/applicationAccelerators/", false); + uri.AppendPath(applicationAcceleratorName, true); + uri.AppendPath("/customizedAccelerators/", false); + uri.AppendPath(customizedAcceleratorName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete the customized accelerator. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The name of the customized accelerator. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, string customizedAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + Argument.AssertNotNullOrEmpty(customizedAcceleratorName, nameof(customizedAcceleratorName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete the customized accelerator. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The name of the customized accelerator. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, string customizedAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + Argument.AssertNotNullOrEmpty(customizedAcceleratorName, nameof(customizedAcceleratorName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateValidateRequest(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, string customizedAcceleratorName, CustomizedAcceleratorProperties properties) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AppPlatform/Spring/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/applicationAccelerators/", false); + uri.AppendPath(applicationAcceleratorName, true); + uri.AppendPath("/customizedAccelerators/", false); + uri.AppendPath(customizedAcceleratorName, true); + uri.AppendPath("/validate", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(properties); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Check the customized accelerator are valid. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The name of the customized accelerator. + /// Customized accelerator properties to be validated. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ValidateAsync(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, string customizedAcceleratorName, CustomizedAcceleratorProperties properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + Argument.AssertNotNullOrEmpty(customizedAcceleratorName, nameof(customizedAcceleratorName)); + Argument.AssertNotNull(properties, nameof(properties)); + + using var message = CreateValidateRequest(subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName, properties); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CustomizedAcceleratorValidateResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CustomizedAcceleratorValidateResult.DeserializeCustomizedAcceleratorValidateResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 202: + return Response.FromValue((CustomizedAcceleratorValidateResult)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Check the customized accelerator are valid. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The name of the customized accelerator. + /// Customized accelerator properties to be validated. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Validate(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, string customizedAcceleratorName, CustomizedAcceleratorProperties properties, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + Argument.AssertNotNullOrEmpty(customizedAcceleratorName, nameof(customizedAcceleratorName)); + Argument.AssertNotNull(properties, nameof(properties)); + + using var message = CreateValidateRequest(subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName, properties); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CustomizedAcceleratorValidateResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CustomizedAcceleratorValidateResult.DeserializeCustomizedAcceleratorValidateResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 202: + return Response.FromValue((CustomizedAcceleratorValidateResult)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Handle requests to list all customized accelerators. + /// The URL to the next page of results. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.CustomizedAcceleratorResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.CustomizedAcceleratorResourceCollection.DeserializeCustomizedAcceleratorResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Handle requests to list all customized accelerators. + /// The URL to the next page of results. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.CustomizedAcceleratorResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.CustomizedAcceleratorResourceCollection.DeserializeCustomizedAcceleratorResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/DeploymentsRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/DeploymentsRestOperations.cs index 7536866a032d..e996e12efe3e 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/DeploymentsRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/DeploymentsRestOperations.cs @@ -34,7 +34,7 @@ public DeploymentsRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-12-01"; + _apiVersion = apiVersion ?? "2023-01-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/DevToolPortalsRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/DevToolPortalsRestOperations.cs new file mode 100644 index 000000000000..b08703f3a242 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/DevToolPortalsRestOperations.cs @@ -0,0 +1,445 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppPlatform.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + internal partial class DevToolPortalsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DevToolPortalsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public DevToolPortalsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-01-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string serviceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AppPlatform/Spring/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/DevToolPortals", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Handles requests to list all resources in a Service. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.DevToolPortalResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.DevToolPortalResourceCollection.DeserializeDevToolPortalResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Handles requests to list all resources in a Service. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.DevToolPortalResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.DevToolPortalResourceCollection.DeserializeDevToolPortalResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string devToolPortalName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AppPlatform/Spring/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/DevToolPortals/", false); + uri.AppendPath(devToolPortalName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the Application Live and its properties. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of Dev Tool Portal. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string devToolPortalName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(devToolPortalName, nameof(devToolPortalName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, devToolPortalName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DevToolPortalResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DevToolPortalResourceData.DeserializeDevToolPortalResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DevToolPortalResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the Application Live and its properties. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of Dev Tool Portal. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string devToolPortalName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(devToolPortalName, nameof(devToolPortalName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, devToolPortalName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DevToolPortalResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DevToolPortalResourceData.DeserializeDevToolPortalResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DevToolPortalResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string devToolPortalName, DevToolPortalResourceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AppPlatform/Spring/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/DevToolPortals/", false); + uri.AppendPath(devToolPortalName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create the default Dev Tool Portal or update the existing Dev Tool Portal. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of Dev Tool Portal. + /// Parameters for the create or update operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string devToolPortalName, DevToolPortalResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(devToolPortalName, nameof(devToolPortalName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, devToolPortalName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create the default Dev Tool Portal or update the existing Dev Tool Portal. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of Dev Tool Portal. + /// Parameters for the create or update operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string devToolPortalName, DevToolPortalResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(devToolPortalName, nameof(devToolPortalName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, devToolPortalName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string devToolPortalName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AppPlatform/Spring/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/DevToolPortals/", false); + uri.AppendPath(devToolPortalName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Disable the default Dev Tool Portal. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of Dev Tool Portal. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string devToolPortalName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(devToolPortalName, nameof(devToolPortalName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, devToolPortalName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Disable the default Dev Tool Portal. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of Dev Tool Portal. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string devToolPortalName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(devToolPortalName, nameof(devToolPortalName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, devToolPortalName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Handles requests to list all resources in a Service. + /// The URL to the next page of results. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.DevToolPortalResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.DevToolPortalResourceCollection.DeserializeDevToolPortalResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Handles requests to list all resources in a Service. + /// The URL to the next page of results. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.DevToolPortalResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.DevToolPortalResourceCollection.DeserializeDevToolPortalResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/GatewayCustomDomainsRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/GatewayCustomDomainsRestOperations.cs index a21ef0526d1c..5b5a940a4442 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/GatewayCustomDomainsRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/GatewayCustomDomainsRestOperations.cs @@ -33,7 +33,7 @@ public GatewayCustomDomainsRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-12-01"; + _apiVersion = apiVersion ?? "2023-01-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/GatewayRouteConfigsRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/GatewayRouteConfigsRestOperations.cs index dbf6ee0c9f46..fd33c9d9f731 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/GatewayRouteConfigsRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/GatewayRouteConfigsRestOperations.cs @@ -33,7 +33,7 @@ public GatewayRouteConfigsRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-12-01"; + _apiVersion = apiVersion ?? "2023-01-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/GatewaysRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/GatewaysRestOperations.cs index 3b837ba509d0..984af1dea651 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/GatewaysRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/GatewaysRestOperations.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using System.Text.Json; using System.Threading; using System.Threading.Tasks; @@ -33,7 +34,7 @@ public GatewaysRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-12-01"; + _apiVersion = apiVersion ?? "2023-01-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -209,6 +210,90 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, } } + internal HttpMessage CreateUpdateCapacityRequest(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, AppPlatformGatewayPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AppPlatform/Spring/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Operation to update an exiting Spring Cloud Gateway capacity. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of Spring Cloud Gateway. + /// The gateway capacity for the update operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateCapacityAsync(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, AppPlatformGatewayPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateCapacityRequest(subscriptionId, resourceGroupName, serviceName, gatewayName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Operation to update an exiting Spring Cloud Gateway capacity. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of Spring Cloud Gateway. + /// The gateway capacity for the update operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response UpdateCapacity(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, AppPlatformGatewayPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateCapacityRequest(subscriptionId, resourceGroupName, serviceName, gatewayName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName) { var message = _pipeline.CreateMessage(); @@ -287,6 +372,101 @@ public Response Delete(string subscriptionId, string resourceGroupName, string s } } + internal HttpMessage CreateListEnvSecretsRequest(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AppPlatform/Spring/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendPath("/listEnvSecrets", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List sensitive environment variables of Spring Cloud Gateway. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of Spring Cloud Gateway. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task>> ListEnvSecretsAsync(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var message = CreateListEnvSecretsRequest(subscriptionId, resourceGroupName, serviceName, gatewayName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + IReadOnlyDictionary value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + Dictionary dictionary = new Dictionary(); + foreach (var property in document.RootElement.EnumerateObject()) + { + dictionary.Add(property.Name, property.Value.GetString()); + } + value = dictionary; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List sensitive environment variables of Spring Cloud Gateway. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of Spring Cloud Gateway. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response> ListEnvSecrets(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var message = CreateListEnvSecretsRequest(subscriptionId, resourceGroupName, serviceName, gatewayName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + IReadOnlyDictionary value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + Dictionary dictionary = new Dictionary(); + foreach (var property in document.RootElement.EnumerateObject()) + { + dictionary.Add(property.Name, property.Value.GetString()); + } + value = dictionary; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string serviceName) { var message = _pipeline.CreateMessage(); diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/MonitoringSettingsRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/MonitoringSettingsRestOperations.cs index e560ce25580f..ab28511fae30 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/MonitoringSettingsRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/MonitoringSettingsRestOperations.cs @@ -32,7 +32,7 @@ public MonitoringSettingsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-12-01"; + _apiVersion = apiVersion ?? "2023-01-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/PredefinedAcceleratorsRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/PredefinedAcceleratorsRestOperations.cs new file mode 100644 index 000000000000..93a295358053 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/PredefinedAcceleratorsRestOperations.cs @@ -0,0 +1,465 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppPlatform.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + internal partial class PredefinedAcceleratorsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of PredefinedAcceleratorsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public PredefinedAcceleratorsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-01-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AppPlatform/Spring/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/applicationAccelerators/", false); + uri.AppendPath(applicationAcceleratorName, true); + uri.AppendPath("/predefinedAccelerators", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Handle requests to list all predefined accelerators. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.PredefinedAcceleratorResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.PredefinedAcceleratorResourceCollection.DeserializePredefinedAcceleratorResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Handle requests to list all predefined accelerators. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.PredefinedAcceleratorResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.PredefinedAcceleratorResourceCollection.DeserializePredefinedAcceleratorResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, string predefinedAcceleratorName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AppPlatform/Spring/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/applicationAccelerators/", false); + uri.AppendPath(applicationAcceleratorName, true); + uri.AppendPath("/predefinedAccelerators/", false); + uri.AppendPath(predefinedAcceleratorName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the predefined accelerator. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The name of the predefined accelerator. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, string predefinedAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + Argument.AssertNotNullOrEmpty(predefinedAcceleratorName, nameof(predefinedAcceleratorName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName, predefinedAcceleratorName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PredefinedAcceleratorResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PredefinedAcceleratorResourceData.DeserializePredefinedAcceleratorResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PredefinedAcceleratorResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the predefined accelerator. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The name of the predefined accelerator. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, string predefinedAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + Argument.AssertNotNullOrEmpty(predefinedAcceleratorName, nameof(predefinedAcceleratorName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName, predefinedAcceleratorName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PredefinedAcceleratorResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PredefinedAcceleratorResourceData.DeserializePredefinedAcceleratorResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PredefinedAcceleratorResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDisableRequest(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, string predefinedAcceleratorName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AppPlatform/Spring/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/applicationAccelerators/", false); + uri.AppendPath(applicationAcceleratorName, true); + uri.AppendPath("/predefinedAccelerators/", false); + uri.AppendPath(predefinedAcceleratorName, true); + uri.AppendPath("/disable", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Disable predefined accelerator. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The name of the predefined accelerator. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DisableAsync(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, string predefinedAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + Argument.AssertNotNullOrEmpty(predefinedAcceleratorName, nameof(predefinedAcceleratorName)); + + using var message = CreateDisableRequest(subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName, predefinedAcceleratorName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Disable predefined accelerator. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The name of the predefined accelerator. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Disable(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, string predefinedAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + Argument.AssertNotNullOrEmpty(predefinedAcceleratorName, nameof(predefinedAcceleratorName)); + + using var message = CreateDisableRequest(subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName, predefinedAcceleratorName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateEnableRequest(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, string predefinedAcceleratorName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AppPlatform/Spring/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/applicationAccelerators/", false); + uri.AppendPath(applicationAcceleratorName, true); + uri.AppendPath("/predefinedAccelerators/", false); + uri.AppendPath(predefinedAcceleratorName, true); + uri.AppendPath("/enable", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Enable predefined accelerator. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The name of the predefined accelerator. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task EnableAsync(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, string predefinedAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + Argument.AssertNotNullOrEmpty(predefinedAcceleratorName, nameof(predefinedAcceleratorName)); + + using var message = CreateEnableRequest(subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName, predefinedAcceleratorName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Enable predefined accelerator. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The name of the predefined accelerator. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Enable(string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, string predefinedAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + Argument.AssertNotNullOrEmpty(predefinedAcceleratorName, nameof(predefinedAcceleratorName)); + + using var message = CreateEnableRequest(subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName, predefinedAcceleratorName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Handle requests to list all predefined accelerators. + /// The URL to the next page of results. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.PredefinedAcceleratorResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.PredefinedAcceleratorResourceCollection.DeserializePredefinedAcceleratorResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Handle requests to list all predefined accelerators. + /// The URL to the next page of results. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Service resource. + /// The name of the application accelerator. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string applicationAcceleratorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(applicationAcceleratorName, nameof(applicationAcceleratorName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, applicationAcceleratorName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.PredefinedAcceleratorResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.PredefinedAcceleratorResourceCollection.DeserializePredefinedAcceleratorResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/RuntimeVersionsRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/RuntimeVersionsRestOperations.cs index ae8cf1376bd1..0ad98ceb7242 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/RuntimeVersionsRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/RuntimeVersionsRestOperations.cs @@ -33,7 +33,7 @@ public RuntimeVersionsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-12-01"; + _apiVersion = apiVersion ?? "2023-01-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ServiceRegistriesRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ServiceRegistriesRestOperations.cs index e8b5a85285b3..111c1f1e3571 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ServiceRegistriesRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ServiceRegistriesRestOperations.cs @@ -33,7 +33,7 @@ public ServiceRegistriesRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-12-01"; + _apiVersion = apiVersion ?? "2023-01-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ServicesRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ServicesRestOperations.cs index 020811713b3c..71522cd1e330 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ServicesRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ServicesRestOperations.cs @@ -33,7 +33,7 @@ public ServicesRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-12-01"; + _apiVersion = apiVersion ?? "2023-01-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/SkusRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/SkusRestOperations.cs index adcddc9879a7..72c2ba721c15 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/SkusRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/SkusRestOperations.cs @@ -33,7 +33,7 @@ public SkusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpo { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-12-01"; + _apiVersion = apiVersion ?? "2023-01-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/StoragesRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/StoragesRestOperations.cs index f19ec274674c..77c48720dbf7 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/StoragesRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/StoragesRestOperations.cs @@ -33,7 +33,7 @@ public StoragesRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-12-01"; + _apiVersion = apiVersion ?? "2023-01-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md index 224c607cadbf..c4dadbc97d95 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md @@ -9,7 +9,7 @@ generate-model-factory: false csharp: true library-name: AppPlatform namespace: Azure.ResourceManager.AppPlatform -require: https://github.com/Azure/azure-rest-api-specs/blob/e99a45d498a1c7fadc18229ecba5d84a471a8771/specification/appplatform/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/appplatform/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true skip-csproj: true