From 79faf37bb06e0d69e10eac01746fe09b728f2cc3 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 22 Mar 2023 03:19:07 +0000 Subject: [PATCH] CodeGen from PR 23213 in Azure/azure-rest-api-specs Merge db181ec7d383d67100e1e3ad98e0a205a13da347 into 9c9786a53eb85f49b77f274fb5baf666ef9f6a30 --- ...ourceManager.AppPlatform.netstandard2.0.cs | 751 +++++++++++++++++- .../src/Generated/AppPlatformBuildResource.cs | 68 ++ .../AppPlatformBuildServiceCollection.cs | 82 ++ .../AppPlatformBuildServiceResource.cs | 76 ++ .../Generated/AppPlatformGatewayResource.cs | 161 +++- .../Generated/AppPlatformServiceResource.cs | 261 ++++++ .../ApplicationAcceleratorResource.cs | 403 ++++++++++ ...pplicationAcceleratorResourceCollection.cs | 340 ++++++++ .../ApplicationAcceleratorResourceData.cs | 43 + .../Generated/ApplicationLiveViewResource.cs | 297 +++++++ .../ApplicationLiveViewResourceCollection.cs | 340 ++++++++ .../ApplicationLiveViewResourceData.cs | 39 + .../Generated/ContainerRegistryResource.cs | 229 ++++++ .../ContainerRegistryResourceCollection.cs | 340 ++++++++ .../ContainerRegistryResourceData.cs | 39 + .../CustomizedAcceleratorResource.cs | 366 +++++++++ ...CustomizedAcceleratorResourceCollection.cs | 340 ++++++++ .../CustomizedAcceleratorResourceData.cs | 43 + .../src/Generated/DevToolPortalResource.cs | 297 +++++++ .../DevToolPortalResourceCollection.cs | 340 ++++++++ .../Generated/DevToolPortalResourceData.cs | 39 + .../Extensions/AppPlatformExtensions.cs | 114 +++ .../AppPlatformBuildServiceOperationSource.cs | 40 + ...ationAcceleratorResourceOperationSource.cs | 40 + ...licationLiveViewResourceOperationSource.cs | 40 + ...ontainerRegistryResourceOperationSource.cs | 40 + ...mizedAcceleratorResourceOperationSource.cs | 40 + .../DevToolPortalResourceOperationSource.cs | 40 + .../AcceleratorAuthSetting.Serialization.cs | 41 + .../Models/AcceleratorAuthSetting.cs | 32 + ...celeratorBasicAuthSetting.Serialization.cs | 71 ++ .../Models/AcceleratorBasicAuthSetting.cs | 47 ++ .../AcceleratorGitRepository.Serialization.cs | 99 +++ .../Models/AcceleratorGitRepository.cs | 71 ++ .../AcceleratorPublicSetting.Serialization.cs | 52 ++ .../Models/AcceleratorPublicSetting.cs | 31 + .../AcceleratorSshSetting.Serialization.cs | 74 ++ .../Generated/Models/AcceleratorSshSetting.cs | 39 + .../src/Generated/Models/ApmType.cs | 60 ++ ...mPersistentDiskProperties.Serialization.cs | 5 + .../AppCustomPersistentDiskProperties.cs | 6 +- .../AppPlatformAppProperties.Serialization.cs | 61 +- .../Models/AppPlatformAppProperties.cs | 42 +- ...ppPlatformAzureFileVolume.Serialization.cs | 27 +- .../Models/AppPlatformAzureFileVolume.cs | 10 +- ...PlatformBindingProperties.Serialization.cs | 24 +- .../Models/AppPlatformBindingProperties.cs | 37 +- ...formBuildResultProperties.Serialization.cs | 24 +- .../AppPlatformBuildResultProperties.cs | 10 +- ...ormBuildServiceProperties.Serialization.cs | 14 +- .../AppPlatformBuildServiceProperties.cs | 12 +- ...ppPlatformBuildServiceProvisioningState.cs | 2 +- ...tformBuildStageProperties.Serialization.cs | 14 +- .../Models/AppPlatformBuildStageProperties.cs | 10 +- ...latformDeploymentSettings.Serialization.cs | 51 +- .../Models/AppPlatformDeploymentSettings.cs | 41 +- .../AppPlatformGatewayPatch.Serialization.cs | 26 + .../Models/AppPlatformGatewayPatch.cs | 21 + ...PlatformGatewayProperties.Serialization.cs | 60 +- .../Models/AppPlatformGatewayProperties.cs | 15 +- ...ewayRouteConfigProperties.Serialization.cs | 70 +- ...AppPlatformGatewayRouteConfigProperties.cs | 16 +- ...PlatformServiceProperties.Serialization.cs | 40 +- .../Models/AppPlatformServiceProperties.cs | 28 +- ...ationAcceleratorComponent.Serialization.cs | 61 ++ .../Models/ApplicationAcceleratorComponent.cs | 40 + ...cationAcceleratorInstance.Serialization.cs | 39 + .../Models/ApplicationAcceleratorInstance.cs | 32 + ...tionAcceleratorProperties.Serialization.cs | 61 ++ .../ApplicationAcceleratorProperties.cs | 36 + ...ApplicationAcceleratorProvisioningState.cs | 60 ++ ...leratorResourceCollection.Serialization.cs | 51 ++ ...pplicationAcceleratorResourceCollection.cs | 43 + ...onAcceleratorResourceData.Serialization.cs | 96 +++ ...celeratorResourceRequests.Serialization.cs | 50 ++ .../ApplicationAcceleratorResourceRequests.cs | 36 + ...licationLiveViewComponent.Serialization.cs | 67 ++ .../Models/ApplicationLiveViewComponent.cs | 70 ++ ...plicationLiveViewInstance.Serialization.cs | 39 + .../Models/ApplicationLiveViewInstance.cs | 32 + ...icationLiveViewProperties.Serialization.cs | 61 ++ .../Models/ApplicationLiveViewProperties.cs | 36 + .../ApplicationLiveViewProvisioningState.cs | 63 ++ ...iveViewResourceCollection.Serialization.cs | 51 ++ .../ApplicationLiveViewResourceCollection.cs | 43 + ...ationLiveViewResourceData.Serialization.cs | 80 ++ ...nLiveViewResourceRequests.Serialization.cs | 50 ++ .../ApplicationLiveViewResourceRequests.cs | 36 + .../Generated/Models/BuildpackBindingType.cs | 3 + ...rRegistryBasicCredentials.Serialization.cs | 65 ++ .../ContainerRegistryBasicCredentials.cs | 53 ++ ...tainerRegistryCredentials.Serialization.cs | 39 + .../Models/ContainerRegistryCredentials.cs | 32 + ...ntainerRegistryProperties.Serialization.cs | 52 ++ .../Models/ContainerRegistryProperties.cs | 52 ++ .../ContainerRegistryProvisioningState.cs | 60 ++ ...egistryResourceCollection.Serialization.cs | 51 ++ .../ContainerRegistryResourceCollection.cs | 37 + ...ainerRegistryResourceData.Serialization.cs | 80 ++ .../Models/CustomScaleRule.Serialization.cs | 98 +++ .../src/Generated/Models/CustomScaleRule.cs | 47 ++ ...izedAcceleratorProperties.Serialization.cs | 118 +++ .../Models/CustomizedAcceleratorProperties.cs | 58 ++ .../CustomizedAcceleratorProvisioningState.cs | 60 ++ ...leratorResourceCollection.Serialization.cs | 51 ++ ...CustomizedAcceleratorResourceCollection.cs | 37 + ...edAcceleratorResourceData.Serialization.cs | 96 +++ ...AcceleratorValidateResult.Serialization.cs | 44 + .../CustomizedAcceleratorValidateResult.cs | 32 + ...ustomizedAcceleratorValidateResultState.cs | 51 ++ ...evToolPortalFeatureDetail.Serialization.cs | 55 ++ .../Models/DevToolPortalFeatureDetail.cs | 32 + ...ToolPortalFeatureSettings.Serialization.cs | 65 ++ .../Models/DevToolPortalFeatureSettings.cs | 32 + .../Models/DevToolPortalFeatureState.cs | 51 ++ .../DevToolPortalInstance.Serialization.cs | 39 + .../Generated/Models/DevToolPortalInstance.cs | 32 + .../DevToolPortalProperties.Serialization.cs | 132 +++ .../Models/DevToolPortalProperties.cs | 57 ++ .../Models/DevToolPortalProvisioningState.cs | 63 ++ ...lPortalResourceCollection.Serialization.cs | 51 ++ .../Models/DevToolPortalResourceCollection.cs | 43 + ...DevToolPortalResourceData.Serialization.cs | 80 ++ ...oolPortalResourceRequests.Serialization.cs | 50 ++ .../Models/DevToolPortalResourceRequests.cs | 36 + ...evToolPortalSsoProperties.Serialization.cs | 99 +++ .../Models/DevToolPortalSsoProperties.cs | 45 ++ .../Models/GatewayCertificateVerification.cs | 51 ++ ...tewayPropertiesClientAuth.Serialization.cs | 76 ++ .../Models/GatewayPropertiesClientAuth.cs | 36 + ...rtiesEnvironmentVariables.Serialization.cs | 88 ++ .../GatewayPropertiesEnvironmentVariables.cs | 37 + .../Models/HttpScaleRule.Serialization.cs | 87 ++ .../src/Generated/Models/HttpScaleRule.cs | 37 + .../MarketplaceResource.Serialization.cs | 66 ++ .../Generated/Models/MarketplaceResource.cs | 36 + ...inedAcceleratorProperties.Serialization.cs | 101 +++ .../Models/PredefinedAcceleratorProperties.cs | 53 ++ .../PredefinedAcceleratorProvisioningState.cs | 57 ++ ...leratorResourceCollection.Serialization.cs | 51 ++ ...PredefinedAcceleratorResourceCollection.cs | 37 + ...edAcceleratorResourceData.Serialization.cs | 96 +++ .../Models/PredefinedAcceleratorState.cs | 51 ++ .../Models/QueueScaleRule.Serialization.cs | 87 ++ .../src/Generated/Models/QueueScaleRule.cs | 40 + .../Generated/Models/Scale.Serialization.cs | 92 +++ .../src/Generated/Models/Scale.cs | 40 + .../Models/ScaleRule.Serialization.cs | 108 +++ .../src/Generated/Models/ScaleRule.cs | 44 + .../Models/ScaleRuleAuth.Serialization.cs | 55 ++ .../src/Generated/Models/ScaleRuleAuth.cs | 32 + .../Generated/Models/Secret.Serialization.cs | 55 ++ .../src/Generated/Models/Secret.cs | 32 + .../Models/ServiceVnetAddons.Serialization.cs | 20 +- .../src/Generated/Models/ServiceVnetAddons.cs | 8 +- .../Models/TcpScaleRule.Serialization.cs | 87 ++ .../src/Generated/Models/TcpScaleRule.cs | 37 + ...ownAcceleratorAuthSetting.Serialization.cs | 41 + .../Models/UnknownAcceleratorAuthSetting.cs | 20 + ...tainerRegistryCredentials.Serialization.cs | 41 + .../UnknownContainerRegistryCredentials.cs | 20 + ...mPersistentDiskProperties.Serialization.cs | 18 +- .../UnknownCustomPersistentDiskProperties.cs | 3 +- .../PredefinedAcceleratorResource.cs | 289 +++++++ ...PredefinedAcceleratorResourceCollection.cs | 258 ++++++ .../PredefinedAcceleratorResourceData.cs | 43 + .../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 | 170 +++- .../BuildpackBindingRestOperations.cs | 157 +++- .../CertificatesRestOperations.cs | 2 +- .../ConfigServersRestOperations.cs | 2 +- .../ConfigurationServicesRestOperations.cs | 2 +- .../ContainerRegistriesRestOperations.cs | 367 +++++++++ .../CustomDomainsRestOperations.cs | 2 +- .../CustomizedAcceleratorsRestOperations.cs | 576 ++++++++++++++ .../DeploymentsRestOperations.cs | 2 +- .../DevToolPortalsRestOperations.cs | 445 +++++++++++ .../GatewayCustomDomainsRestOperations.cs | 2 +- .../GatewayRouteConfigsRestOperations.cs | 2 +- .../RestOperations/GatewaysRestOperations.cs | 259 +++++- .../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 +- 195 files changed, 15526 insertions(+), 215 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/ContainerRegistryResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ContainerRegistryResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ContainerRegistryResourceData.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/AppPlatformBuildServiceOperationSource.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/ContainerRegistryResourceOperationSource.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/ContainerRegistryBasicCredentials.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryBasicCredentials.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryCredentials.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryCredentials.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryProvisioningState.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryResourceCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryResourceData.Serialization.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/GatewayCertificateVerification.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayPropertiesClientAuth.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayPropertiesClientAuth.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/Models/UnknownContainerRegistryCredentials.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UnknownContainerRegistryCredentials.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/ContainerRegistriesRestOperations.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 3c03e8cf7a13e..473cf18a1f8ab 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() { } @@ -259,6 +334,8 @@ protected AppPlatformBuildResource() { } public virtual Azure.ResourceManager.AppPlatform.AppPlatformBuildData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName) { 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 Azure.Response GetAppPlatformBuildResult(string buildResultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAppPlatformBuildResultAsync(string buildResultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -332,6 +409,8 @@ protected AppPlatformBuildServiceAgentPoolResource() { } public partial class AppPlatformBuildServiceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected AppPlatformBuildServiceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string buildServiceName, Azure.ResourceManager.AppPlatform.AppPlatformBuildServiceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string buildServiceName, Azure.ResourceManager.AppPlatform.AppPlatformBuildServiceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string buildServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string buildServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string buildServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -373,6 +452,8 @@ protected AppPlatformBuildServiceResource() { } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetResourceUploadUri(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetResourceUploadUriAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.AppPlatformBuildServiceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.AppPlatformBuildServiceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class AppPlatformCertificateCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -556,6 +637,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 +668,10 @@ 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.ContainerRegistryResource GetContainerRegistryResource(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 +749,12 @@ 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 Restart(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RestartAsync(Azure.WaitUntil waitUntil, 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 +882,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; } @@ -818,8 +915,16 @@ protected AppPlatformServiceResource() { } public virtual System.Threading.Tasks.Task> GetAppPlatformStorageAsync(string storageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppPlatform.AppPlatformStorageCollection GetAppPlatformStorages() { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetContainerRegistryResource(string containerRegistryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetContainerRegistryResourceAsync(string containerRegistryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.ContainerRegistryResourceCollection GetContainerRegistryResources() { 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 +1032,205 @@ 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 ContainerRegistryResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ContainerRegistryResource() { } + public virtual Azure.ResourceManager.AppPlatform.ContainerRegistryResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string containerRegistryName) { 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.ContainerRegistryResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.ContainerRegistryResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ContainerRegistryResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ContainerRegistryResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string containerRegistryName, Azure.ResourceManager.AppPlatform.ContainerRegistryResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string containerRegistryName, Azure.ResourceManager.AppPlatform.ContainerRegistryResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string containerRegistryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string containerRegistryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string containerRegistryName, 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 containerRegistryName, 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 ContainerRegistryResourceData : Azure.ResourceManager.Models.ResourceData + { + public ContainerRegistryResourceData() { } + public Azure.ResourceManager.AppPlatform.Models.ContainerRegistryProperties Properties { get { throw null; } set { } } + } + 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 CaCertResourceId { get { throw null; } set { } } + 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 string CaCertResourceId { get { throw null; } set { } } + } + 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 +1257,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 +1320,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 +1374,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 +1495,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 +1505,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 +1533,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 +1631,8 @@ 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 Image { get { throw null; } } public string Name { get { throw null; } set { } } public Azure.ResourceManager.AppPlatform.Models.AppPlatformBuildResultProvisioningState? ProvisioningState { get { throw null; } } } @@ -1277,7 +1671,8 @@ public AppPlatformBuildServiceAgentPoolProperties() { } public partial class AppPlatformBuildServiceProperties { public AppPlatformBuildServiceProperties() { } - public string KPackVersion { get { throw null; } set { } } + public string ContainerRegistry { get { throw null; } set { } } + public string KPackVersion { get { throw null; } } public Azure.ResourceManager.AppPlatform.Models.AppPlatformBuildServiceProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.AppPlatform.Models.AppPlatformBuildServiceResourceRequirements ResourceRequests { get { throw null; } set { } } } @@ -1311,7 +1706,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 +1980,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 +2065,19 @@ 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.GatewayPropertiesClientAuth ClientAuth { get { throw null; } set { } } 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 +2118,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,13 +2247,16 @@ public partial class AppPlatformServiceProperties { public AppPlatformServiceProperties() { } public string Fqdn { get { throw null; } } - public bool? IsLogStreamPublicEndpoint { get { throw null; } set { } } + public string InfraResourceGroup { 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; } } public System.Guid? ServiceId { get { throw null; } } public int? Version { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.ServiceVnetAddons VnetAddons { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AppPlatformServiceProvisioningState : System.IEquatable @@ -2227,6 +2639,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 +2699,226 @@ internal ConfigServerSettingsValidateResult() { } public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } public bool? IsValid { get { throw null; } } } + public partial class ContainerRegistryBasicCredentials : Azure.ResourceManager.AppPlatform.Models.ContainerRegistryCredentials + { + public ContainerRegistryBasicCredentials(string server, string username, string password) { } + public string Password { get { throw null; } set { } } + public string Server { get { throw null; } set { } } + public string Username { get { throw null; } set { } } + } + public abstract partial class ContainerRegistryCredentials + { + protected ContainerRegistryCredentials() { } + } + public partial class ContainerRegistryProperties + { + public ContainerRegistryProperties(Azure.ResourceManager.AppPlatform.Models.ContainerRegistryCredentials credentials) { } + public Azure.ResourceManager.AppPlatform.Models.ContainerRegistryCredentials Credentials { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.ContainerRegistryProvisioningState? ProvisioningState { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ContainerRegistryProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ContainerRegistryProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.ContainerRegistryProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ContainerRegistryProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ContainerRegistryProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ContainerRegistryProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ContainerRegistryProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.ContainerRegistryProvisioningState 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.ContainerRegistryProvisioningState left, Azure.ResourceManager.AppPlatform.Models.ContainerRegistryProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.ContainerRegistryProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.ContainerRegistryProvisioningState left, Azure.ResourceManager.AppPlatform.Models.ContainerRegistryProvisioningState right) { throw null; } + public override string ToString() { 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; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct GatewayCertificateVerification : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public GatewayCertificateVerification(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.GatewayCertificateVerification Disabled { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.GatewayCertificateVerification Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.GatewayCertificateVerification 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.GatewayCertificateVerification left, Azure.ResourceManager.AppPlatform.Models.GatewayCertificateVerification right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.GatewayCertificateVerification (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.GatewayCertificateVerification left, Azure.ResourceManager.AppPlatform.Models.GatewayCertificateVerification right) { throw null; } + public override string ToString() { throw null; } + } + public partial class GatewayPropertiesClientAuth + { + public GatewayPropertiesClientAuth() { } + public System.Collections.Generic.IList Certificates { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.GatewayCertificateVerification? CertificateVerification { get { throw null; } set { } } + } + 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 +2945,123 @@ 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 ServiceVnetAddons + { + public ServiceVnetAddons() { } + public bool? DataPlanePublicEndpoint { get { throw null; } set { } } + public bool? IsLogStreamPublicEndpoint { 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/AppPlatformBuildResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildResource.cs index 3736a727acefe..23958751c9383 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildResource.cs @@ -203,6 +203,74 @@ public virtual Response Get(CancellationToken cancella } } + /// + /// delete a KPack build. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName} + /// + /// + /// Operation Id + /// BuildService_DeleteBuild + /// + /// + /// + /// 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 = _appPlatformBuildBuildServiceClientDiagnostics.CreateScope("AppPlatformBuildResource.Delete"); + scope.Start(); + try + { + var response = await _appPlatformBuildBuildServiceRestClient.DeleteBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_appPlatformBuildBuildServiceClientDiagnostics, Pipeline, _appPlatformBuildBuildServiceRestClient.CreateDeleteBuildRequest(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 a KPack build. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName} + /// + /// + /// Operation Id + /// BuildService_DeleteBuild + /// + /// + /// + /// 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 = _appPlatformBuildBuildServiceClientDiagnostics.CreateScope("AppPlatformBuildResource.Delete"); + scope.Start(); + try + { + var response = _appPlatformBuildBuildServiceRestClient.DeleteBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_appPlatformBuildBuildServiceClientDiagnostics, Pipeline, _appPlatformBuildBuildServiceRestClient.CreateDeleteBuildRequest(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 a KPack build. /// diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildServiceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildServiceCollection.cs index f3e75a9a8e6e4..ab07cb544823f 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildServiceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildServiceCollection.cs @@ -52,6 +52,88 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AppPlatformServiceResource.ResourceType), nameof(id)); } + /// + /// Create a build service resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName} + /// + /// + /// Operation Id + /// BuildService_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 build service resource. + /// Parameters for the create 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 buildServiceName, AppPlatformBuildServiceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _appPlatformBuildServiceBuildServiceClientDiagnostics.CreateScope("AppPlatformBuildServiceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _appPlatformBuildServiceBuildServiceRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildServiceName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new AppPlatformBuildServiceOperationSource(Client), _appPlatformBuildServiceBuildServiceClientDiagnostics, Pipeline, _appPlatformBuildServiceBuildServiceRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildServiceName, 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 a build service resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName} + /// + /// + /// Operation Id + /// BuildService_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 build service resource. + /// Parameters for the create 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 buildServiceName, AppPlatformBuildServiceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _appPlatformBuildServiceBuildServiceClientDiagnostics.CreateScope("AppPlatformBuildServiceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _appPlatformBuildServiceBuildServiceRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildServiceName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new AppPlatformBuildServiceOperationSource(Client), _appPlatformBuildServiceBuildServiceClientDiagnostics, Pipeline, _appPlatformBuildServiceBuildServiceRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildServiceName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Get a build service resource. /// diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildServiceResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildServiceResource.cs index 03053830625de..2cffb04b79192 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildServiceResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildServiceResource.cs @@ -416,6 +416,82 @@ public virtual Response Get(CancellationToken c } } + /// + /// Create a build service resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName} + /// + /// + /// Operation Id + /// BuildService_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 operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, AppPlatformBuildServiceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _appPlatformBuildServiceBuildServiceClientDiagnostics.CreateScope("AppPlatformBuildServiceResource.Update"); + scope.Start(); + try + { + var response = await _appPlatformBuildServiceBuildServiceRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new AppPlatformBuildServiceOperationSource(Client), _appPlatformBuildServiceBuildServiceClientDiagnostics, Pipeline, _appPlatformBuildServiceBuildServiceRestClient.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 a build service resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName} + /// + /// + /// Operation Id + /// BuildService_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 operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, AppPlatformBuildServiceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _appPlatformBuildServiceBuildServiceClientDiagnostics.CreateScope("AppPlatformBuildServiceResource.Update"); + scope.Start(); + try + { + var response = _appPlatformBuildServiceBuildServiceRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new AppPlatformBuildServiceOperationSource(Client), _appPlatformBuildServiceBuildServiceClientDiagnostics, Pipeline, _appPlatformBuildServiceBuildServiceRestClient.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; + } + } + /// /// Get an resource upload URL for build service, which may be artifacts or source archive. /// diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformGatewayResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformGatewayResource.cs index 2a4a52e4a3b98..b8f6b55adb085 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,134 @@ 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; + } + } + + /// + /// Restart the Spring Cloud Gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/restart + /// + /// + /// Operation Id + /// Gateways_Restart + /// + /// + /// + /// 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 RestartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _appPlatformGatewayGatewaysClientDiagnostics.CreateScope("AppPlatformGatewayResource.Restart"); + scope.Start(); + try + { + var response = await _appPlatformGatewayGatewaysRestClient.RestartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_appPlatformGatewayGatewaysClientDiagnostics, Pipeline, _appPlatformGatewayGatewaysRestClient.CreateRestartRequest(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; + } + } + + /// + /// Restart the Spring Cloud Gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/restart + /// + /// + /// Operation Id + /// Gateways_Restart + /// + /// + /// + /// 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 Restart(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _appPlatformGatewayGatewaysClientDiagnostics.CreateScope("AppPlatformGatewayResource.Restart"); + scope.Start(); + try + { + var response = _appPlatformGatewayGatewaysRestClient.Restart(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_appPlatformGatewayGatewaysClientDiagnostics, Pipeline, _appPlatformGatewayGatewaysRestClient.CreateRestartRequest(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; + } + } + /// /// 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 16af20298f063..87b4e3c56f481 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,165 @@ 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 ContainerRegistryResources in the AppPlatformService. + /// An object representing collection of ContainerRegistryResources and their operations over a ContainerRegistryResource. + public virtual ContainerRegistryResourceCollection GetContainerRegistryResources() + { + return GetCachedClient(Client => new ContainerRegistryResourceCollection(Client, Id)); + } + + /// + /// Get the container registries resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/containerRegistries/{containerRegistryName} + /// + /// + /// Operation Id + /// ContainerRegistries_Get + /// + /// + /// + /// The name of the container registry. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetContainerRegistryResourceAsync(string containerRegistryName, CancellationToken cancellationToken = default) + { + return await GetContainerRegistryResources().GetAsync(containerRegistryName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the container registries resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/containerRegistries/{containerRegistryName} + /// + /// + /// Operation Id + /// ContainerRegistries_Get + /// + /// + /// + /// The name of the container registry. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetContainerRegistryResource(string containerRegistryName, CancellationToken cancellationToken = default) + { + return GetContainerRegistryResources().Get(containerRegistryName, 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 +703,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 +1424,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 0000000000000..84c9fcc093be5 --- /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 0000000000000..3c3a803113029 --- /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 0000000000000..77e1bb0c567f8 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApplicationAcceleratorResourceData.cs @@ -0,0 +1,43 @@ +// 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. + /// Application accelerator resource + /// + 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 0000000000000..0a02de2551144 --- /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 0000000000000..78e111bf98e89 --- /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 0000000000000..9c1a0edcf6599 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApplicationLiveViewResourceData.cs @@ -0,0 +1,39 @@ +// 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. + /// Application Live View resource + /// + 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/ContainerRegistryResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ContainerRegistryResource.cs new file mode 100644 index 0000000000000..6b426b0632c86 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ContainerRegistryResource.cs @@ -0,0 +1,229 @@ +// 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 ContainerRegistryResource 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 GetContainerRegistryResource method. + /// Otherwise you can get one from its parent resource using the GetContainerRegistryResource method. + /// + public partial class ContainerRegistryResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string containerRegistryName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/containerRegistries/{containerRegistryName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _containerRegistryResourceContainerRegistriesClientDiagnostics; + private readonly ContainerRegistriesRestOperations _containerRegistryResourceContainerRegistriesRestClient; + private readonly ContainerRegistryResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected ContainerRegistryResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ContainerRegistryResource(ArmClient client, ContainerRegistryResourceData 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 ContainerRegistryResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _containerRegistryResourceContainerRegistriesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string containerRegistryResourceContainerRegistriesApiVersion); + _containerRegistryResourceContainerRegistriesRestClient = new ContainerRegistriesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerRegistryResourceContainerRegistriesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/containerRegistries"; + + /// 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 ContainerRegistryResourceData 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 container registries resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/containerRegistries/{containerRegistryName} + /// + /// + /// Operation Id + /// ContainerRegistries_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _containerRegistryResourceContainerRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.Get"); + scope.Start(); + try + { + var response = await _containerRegistryResourceContainerRegistriesRestClient.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 ContainerRegistryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the container registries resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/containerRegistries/{containerRegistryName} + /// + /// + /// Operation Id + /// ContainerRegistries_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _containerRegistryResourceContainerRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.Get"); + scope.Start(); + try + { + var response = _containerRegistryResourceContainerRegistriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ContainerRegistryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container registry resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/containerRegistries/{containerRegistryName} + /// + /// + /// Operation Id + /// ContainerRegistries_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, ContainerRegistryResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _containerRegistryResourceContainerRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.Update"); + scope.Start(); + try + { + var response = await _containerRegistryResourceContainerRegistriesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new ContainerRegistryResourceOperationSource(Client), _containerRegistryResourceContainerRegistriesClientDiagnostics, Pipeline, _containerRegistryResourceContainerRegistriesRestClient.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 container registry resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/containerRegistries/{containerRegistryName} + /// + /// + /// Operation Id + /// ContainerRegistries_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, ContainerRegistryResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _containerRegistryResourceContainerRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.Update"); + scope.Start(); + try + { + var response = _containerRegistryResourceContainerRegistriesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new ContainerRegistryResourceOperationSource(Client), _containerRegistryResourceContainerRegistriesClientDiagnostics, Pipeline, _containerRegistryResourceContainerRegistriesRestClient.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/ContainerRegistryResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ContainerRegistryResourceCollection.cs new file mode 100644 index 0000000000000..f4bc61e51910e --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ContainerRegistryResourceCollection.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 GetContainerRegistryResources method from an instance of . + /// + public partial class ContainerRegistryResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _containerRegistryResourceContainerRegistriesClientDiagnostics; + private readonly ContainerRegistriesRestOperations _containerRegistryResourceContainerRegistriesRestClient; + + /// Initializes a new instance of the class for mocking. + protected ContainerRegistryResourceCollection() + { + } + + /// 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 ContainerRegistryResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _containerRegistryResourceContainerRegistriesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ContainerRegistryResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ContainerRegistryResource.ResourceType, out string containerRegistryResourceContainerRegistriesApiVersion); + _containerRegistryResourceContainerRegistriesRestClient = new ContainerRegistriesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerRegistryResourceContainerRegistriesApiVersion); +#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 container registry resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/containerRegistries/{containerRegistryName} + /// + /// + /// Operation Id + /// ContainerRegistries_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 container registry. + /// 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 containerRegistryName, ContainerRegistryResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerRegistryName, nameof(containerRegistryName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _containerRegistryResourceContainerRegistriesClientDiagnostics.CreateScope("ContainerRegistryResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _containerRegistryResourceContainerRegistriesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerRegistryName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new ContainerRegistryResourceOperationSource(Client), _containerRegistryResourceContainerRegistriesClientDiagnostics, Pipeline, _containerRegistryResourceContainerRegistriesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerRegistryName, 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 container registry resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/containerRegistries/{containerRegistryName} + /// + /// + /// Operation Id + /// ContainerRegistries_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 container registry. + /// 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 containerRegistryName, ContainerRegistryResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerRegistryName, nameof(containerRegistryName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _containerRegistryResourceContainerRegistriesClientDiagnostics.CreateScope("ContainerRegistryResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _containerRegistryResourceContainerRegistriesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerRegistryName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new ContainerRegistryResourceOperationSource(Client), _containerRegistryResourceContainerRegistriesClientDiagnostics, Pipeline, _containerRegistryResourceContainerRegistriesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerRegistryName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the container registries resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/containerRegistries/{containerRegistryName} + /// + /// + /// Operation Id + /// ContainerRegistries_Get + /// + /// + /// + /// The name of the container registry. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string containerRegistryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerRegistryName, nameof(containerRegistryName)); + + using var scope = _containerRegistryResourceContainerRegistriesClientDiagnostics.CreateScope("ContainerRegistryResourceCollection.Get"); + scope.Start(); + try + { + var response = await _containerRegistryResourceContainerRegistriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerRegistryName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ContainerRegistryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the container registries resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/containerRegistries/{containerRegistryName} + /// + /// + /// Operation Id + /// ContainerRegistries_Get + /// + /// + /// + /// The name of the container registry. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string containerRegistryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerRegistryName, nameof(containerRegistryName)); + + using var scope = _containerRegistryResourceContainerRegistriesClientDiagnostics.CreateScope("ContainerRegistryResourceCollection.Get"); + scope.Start(); + try + { + var response = _containerRegistryResourceContainerRegistriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerRegistryName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ContainerRegistryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List container registries resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/containerRegistries + /// + /// + /// Operation Id + /// ContainerRegistries_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) => _containerRegistryResourceContainerRegistriesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerRegistryResourceContainerRegistriesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ContainerRegistryResource(Client, ContainerRegistryResourceData.DeserializeContainerRegistryResourceData(e)), _containerRegistryResourceContainerRegistriesClientDiagnostics, Pipeline, "ContainerRegistryResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List container registries resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/containerRegistries + /// + /// + /// Operation Id + /// ContainerRegistries_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) => _containerRegistryResourceContainerRegistriesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerRegistryResourceContainerRegistriesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ContainerRegistryResource(Client, ContainerRegistryResourceData.DeserializeContainerRegistryResourceData(e)), _containerRegistryResourceContainerRegistriesClientDiagnostics, Pipeline, "ContainerRegistryResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/containerRegistries/{containerRegistryName} + /// + /// + /// Operation Id + /// ContainerRegistries_Get + /// + /// + /// + /// The name of the container registry. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string containerRegistryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerRegistryName, nameof(containerRegistryName)); + + using var scope = _containerRegistryResourceContainerRegistriesClientDiagnostics.CreateScope("ContainerRegistryResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _containerRegistryResourceContainerRegistriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerRegistryName, 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}/containerRegistries/{containerRegistryName} + /// + /// + /// Operation Id + /// ContainerRegistries_Get + /// + /// + /// + /// The name of the container registry. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string containerRegistryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerRegistryName, nameof(containerRegistryName)); + + using var scope = _containerRegistryResourceContainerRegistriesClientDiagnostics.CreateScope("ContainerRegistryResourceCollection.Exists"); + scope.Start(); + try + { + var response = _containerRegistryResourceContainerRegistriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerRegistryName, 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/ContainerRegistryResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ContainerRegistryResourceData.cs new file mode 100644 index 0000000000000..665b943c24363 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ContainerRegistryResourceData.cs @@ -0,0 +1,39 @@ +// 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 ContainerRegistryResource data model. + /// Container registry resource payload. + /// + public partial class ContainerRegistryResourceData : ResourceData + { + /// Initializes a new instance of ContainerRegistryResourceData. + public ContainerRegistryResourceData() + { + } + + /// Initializes a new instance of ContainerRegistryResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Properties of the container registry resource payload. + internal ContainerRegistryResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ContainerRegistryProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// Properties of the container registry resource payload. + public ContainerRegistryProperties 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 0000000000000..8be2ac7a1adfd --- /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 0000000000000..c85923659ea88 --- /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 0000000000000..77241c178dbd1 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomizedAcceleratorResourceData.cs @@ -0,0 +1,43 @@ +// 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. + /// Customized accelerator resource + /// + 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 0000000000000..17b70bcf52a4e --- /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 0000000000000..6d0fae28fe097 --- /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 0000000000000..274b259a56577 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DevToolPortalResourceData.cs @@ -0,0 +1,39 @@ +// 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. + /// Dev Tool Portal resource + /// + 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 f5a27a2a07f84..a2eef9b0ed51e 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,63 @@ 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 ContainerRegistryResource + /// + /// 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 ContainerRegistryResource GetContainerRegistryResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + ContainerRegistryResource.ValidateResourceId(id); + return new ContainerRegistryResource(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 +790,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/AppPlatformBuildServiceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppPlatformBuildServiceOperationSource.cs new file mode 100644 index 0000000000000..aab5dcbe8c4ce --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppPlatformBuildServiceOperationSource.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 AppPlatformBuildServiceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal AppPlatformBuildServiceOperationSource(ArmClient client) + { + _client = client; + } + + AppPlatformBuildServiceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = AppPlatformBuildServiceData.DeserializeAppPlatformBuildServiceData(document.RootElement); + return new AppPlatformBuildServiceResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = AppPlatformBuildServiceData.DeserializeAppPlatformBuildServiceData(document.RootElement); + return new AppPlatformBuildServiceResource(_client, data); + } + } +} 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 0000000000000..f88fb0fb1697e --- /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 0000000000000..1eb978fd3ac78 --- /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/ContainerRegistryResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ContainerRegistryResourceOperationSource.cs new file mode 100644 index 0000000000000..1491ebc51ff03 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ContainerRegistryResourceOperationSource.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 ContainerRegistryResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ContainerRegistryResourceOperationSource(ArmClient client) + { + _client = client; + } + + ContainerRegistryResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = ContainerRegistryResourceData.DeserializeContainerRegistryResourceData(document.RootElement); + return new ContainerRegistryResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = ContainerRegistryResourceData.DeserializeContainerRegistryResourceData(document.RootElement); + return new ContainerRegistryResource(_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 0000000000000..b8e40f3424a9a --- /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 0000000000000..6b18fa263f812 --- /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 0000000000000..b054002eb241e --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorAuthSetting.Serialization.cs @@ -0,0 +1,41 @@ +// 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.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..1c657590d07d1 --- /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 0000000000000..7420d2e1ad2c0 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorBasicAuthSetting.Serialization.cs @@ -0,0 +1,71 @@ +// 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(); + if (Optional.IsDefined(CaCertResourceId)) + { + writer.WritePropertyName("caCertResourceId"u8); + writer.WriteStringValue(CaCertResourceId); + } + 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional caCertResourceId = default; + string username = default; + Optional password = default; + string authType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("caCertResourceId"u8)) + { + caCertResourceId = property.Value.GetString(); + continue; + } + 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, caCertResourceId.Value, 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 0000000000000..b013db3c02acf --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorBasicAuthSetting.cs @@ -0,0 +1,47 @@ +// 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. + /// Resource Id of CA certificate for https URL of Git repository. + /// Username of git repository basic auth. + /// Password of git repository basic auth. + internal AcceleratorBasicAuthSetting(string authType, string caCertResourceId, string username, string password) : base(authType) + { + CaCertResourceId = caCertResourceId; + Username = username; + Password = password; + AuthType = authType ?? "BasicAuth"; + } + + /// Resource Id of CA certificate for https URL of Git repository. + public string CaCertResourceId { get; set; } + /// 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 0000000000000..5d8625213767e --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorGitRepository.Serialization.cs @@ -0,0 +1,99 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..cb8fce9483b12 --- /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 0000000000000..1359a3fec0b60 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorPublicSetting.Serialization.cs @@ -0,0 +1,52 @@ +// 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(); + if (Optional.IsDefined(CaCertResourceId)) + { + writer.WritePropertyName("caCertResourceId"u8); + writer.WriteStringValue(CaCertResourceId); + } + writer.WritePropertyName("authType"u8); + writer.WriteStringValue(AuthType); + writer.WriteEndObject(); + } + + internal static AcceleratorPublicSetting DeserializeAcceleratorPublicSetting(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional caCertResourceId = default; + string authType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("caCertResourceId"u8)) + { + caCertResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("authType"u8)) + { + authType = property.Value.GetString(); + continue; + } + } + return new AcceleratorPublicSetting(authType, caCertResourceId.Value); + } + } +} 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 0000000000000..fc637836419f8 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorPublicSetting.cs @@ -0,0 +1,31 @@ +// 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. + /// Resource Id of CA certificate for https URL of Git repository. + internal AcceleratorPublicSetting(string authType, string caCertResourceId) : base(authType) + { + CaCertResourceId = caCertResourceId; + AuthType = authType ?? "Public"; + } + + /// Resource Id of CA certificate for https URL of Git repository. + public string CaCertResourceId { get; set; } + } +} 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 0000000000000..feb01621fad18 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AcceleratorSshSetting.Serialization.cs @@ -0,0 +1,74 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..3fd09c25afe98 --- /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 0000000000000..5d789ce0f15b4 --- /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 1035d739ccbd1..e7ea8714f0208 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 fec6442cc5843..662bcc92c5d41 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 d1ca758e8bd87..e39d1e2920386 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 @@ -34,22 +34,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNullValue(); continue; } - writer.WriteStartObject(); - foreach (var item0 in item.Value) - { - writer.WritePropertyName(item0.Key); - if (item0.Value == null) - { - writer.WriteNullValue(); - continue; - } #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(); } @@ -103,6 +92,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(); } @@ -114,7 +113,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; @@ -125,6 +124,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)) @@ -154,7 +154,7 @@ internal static AppPlatformAppProperties DeserializeAppPlatformAppProperties(Jso property.ThrowNonNullablePropertyIsNull(); continue; } - Dictionary> dictionary = new Dictionary>(); + Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -163,19 +163,7 @@ internal static AppPlatformAppProperties DeserializeAppPlatformAppProperties(Jso } else { - Dictionary dictionary0 = new Dictionary(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - dictionary0.Add(property1.Name, null); - } - else - { - 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; @@ -286,8 +274,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 59e11b8409cb9..0cc898b2e1a3d 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 f1a2f2458d879..8a3ae2f90e68c 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); @@ -46,10 +54,11 @@ internal static AppPlatformAzureFileVolume DeserializeAppPlatformAzureFileVolume { return null; } - 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()) { @@ -78,6 +87,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) @@ -94,7 +113,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 09c545c9ec906..bc36a072cdd4f 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 4176af5490d62..cff2c9b6532c2 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,16 +34,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) foreach (var item in BindingParameters) { writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#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(); } @@ -60,7 +51,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; @@ -98,17 +89,10 @@ internal static AppPlatformBindingProperties DeserializeAppPlatformBindingProper property.ThrowNonNullablePropertyIsNull(); continue; } - Dictionary dictionary = new Dictionary(); + Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property0.Name, null); - } - else - { - 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 53620644d3710..0b8b26d0047ec 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 7d556db8f045c..5d980d8ab9ca4 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); @@ -37,8 +42,10 @@ internal static AppPlatformBuildResultProperties DeserializeAppPlatformBuildResu } Optional name = default; Optional provisioningState = default; + Optional error = default; Optional buildPodName = default; Optional> buildStages = default; + Optional image = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name"u8)) @@ -56,6 +63,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(); @@ -76,8 +93,13 @@ internal static AppPlatformBuildResultProperties DeserializeAppPlatformBuildResu buildStages = array; continue; } + if (property.NameEquals("image"u8)) + { + image = property.Value.GetString(); + 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), image.Value); } } } 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 9fa0a0bdfeec9..baabc9d21b333 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildResultProperties.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildResultProperties.cs @@ -22,23 +22,31 @@ 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) + /// The container registry image of this build result. + internal AppPlatformBuildResultProperties(string name, AppPlatformBuildResultProvisioningState? provisioningState, AppPlatformErrorInfo error, string buildPodName, IReadOnlyList buildStages, string image) { Name = name; ProvisioningState = provisioningState; + Error = error; BuildPodName = buildPodName; BuildStages = buildStages; + Image = image; } /// The name of this build result. 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. public IReadOnlyList BuildStages { get; } + /// The container registry image of this build result. + public string Image { get; } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildServiceProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildServiceProperties.Serialization.cs index abbb7724071e2..c3346d20cf5ec 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildServiceProperties.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildServiceProperties.Serialization.cs @@ -15,10 +15,10 @@ public partial class AppPlatformBuildServiceProperties : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(KPackVersion)) + if (Optional.IsDefined(ContainerRegistry)) { - writer.WritePropertyName("kPackVersion"u8); - writer.WriteStringValue(KPackVersion); + writer.WritePropertyName("containerRegistry"u8); + writer.WriteStringValue(ContainerRegistry); } if (Optional.IsDefined(ResourceRequests)) { @@ -34,11 +34,17 @@ internal static AppPlatformBuildServiceProperties DeserializeAppPlatformBuildSer { return null; } + Optional containerRegistry = default; Optional kPackVersion = default; Optional provisioningState = default; Optional resourceRequests = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("containerRegistry"u8)) + { + containerRegistry = property.Value.GetString(); + continue; + } if (property.NameEquals("kPackVersion"u8)) { kPackVersion = property.Value.GetString(); @@ -65,7 +71,7 @@ internal static AppPlatformBuildServiceProperties DeserializeAppPlatformBuildSer continue; } } - return new AppPlatformBuildServiceProperties(kPackVersion.Value, Optional.ToNullable(provisioningState), resourceRequests.Value); + return new AppPlatformBuildServiceProperties(containerRegistry.Value, kPackVersion.Value, Optional.ToNullable(provisioningState), resourceRequests.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildServiceProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildServiceProperties.cs index 315ec00820799..e712bd7a80343 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildServiceProperties.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildServiceProperties.cs @@ -16,19 +16,23 @@ public AppPlatformBuildServiceProperties() } /// Initializes a new instance of AppPlatformBuildServiceProperties. + /// The resource id of the container registry used in this build service. /// The installed KPack version in this build service. - /// Provisioning state of the KPack build result. + /// Provisioning state of the KPack build service. /// The runtime resource configuration of this build service. - internal AppPlatformBuildServiceProperties(string kPackVersion, AppPlatformBuildServiceProvisioningState? provisioningState, AppPlatformBuildServiceResourceRequirements resourceRequests) + internal AppPlatformBuildServiceProperties(string containerRegistry, string kPackVersion, AppPlatformBuildServiceProvisioningState? provisioningState, AppPlatformBuildServiceResourceRequirements resourceRequests) { + ContainerRegistry = containerRegistry; KPackVersion = kPackVersion; ProvisioningState = provisioningState; ResourceRequests = resourceRequests; } + /// The resource id of the container registry used in this build service. + public string ContainerRegistry { get; set; } /// The installed KPack version in this build service. - public string KPackVersion { get; set; } - /// Provisioning state of the KPack build result. + public string KPackVersion { get; } + /// Provisioning state of the KPack build service. public AppPlatformBuildServiceProvisioningState? ProvisioningState { get; } /// The runtime resource configuration of this build service. public AppPlatformBuildServiceResourceRequirements ResourceRequests { get; set; } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildServiceProvisioningState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildServiceProvisioningState.cs index 6cb6f9b95a25e..f756f9aaf7ff5 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildServiceProvisioningState.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformBuildServiceProvisioningState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.AppPlatform.Models { - /// Provisioning state of the KPack build result. + /// Provisioning state of the KPack build service. public readonly partial struct AppPlatformBuildServiceProvisioningState : IEquatable { private readonly string _value; 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 d0a6588d687de..2265c740dc45c 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 @@ -20,6 +20,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)) @@ -37,8 +39,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 5ae34c835e419..776326d08fe3f 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 8cb8ce3a541eb..fea1720e912ef 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 @@ -45,22 +45,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNullValue(); continue; } - writer.WriteStartObject(); - foreach (var item0 in item.Value) - { - writer.WritePropertyName(item0.Key); - if (item0.Value == null) - { - writer.WriteNullValue(); - continue; - } #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(); } @@ -84,6 +73,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); @@ -100,11 +94,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()) { @@ -140,7 +135,7 @@ internal static AppPlatformDeploymentSettings DeserializeAppPlatformDeploymentSe property.ThrowNonNullablePropertyIsNull(); continue; } - Dictionary> dictionary = new Dictionary>(); + Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -149,19 +144,7 @@ internal static AppPlatformDeploymentSettings DeserializeAppPlatformDeploymentSe } else { - Dictionary dictionary0 = new Dictionary(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - if (property1.Value.ValueKind == JsonValueKind.Null) - { - dictionary0.Add(property1.Name, null); - } - else - { - 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; @@ -207,6 +190,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) @@ -218,7 +211,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 bf25fe3aae4b3..d2a2bca562e7d 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 0000000000000..210a0f027bf17 --- /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 0000000000000..4a65add6bfd54 --- /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 916ea5d152161..7be2cab5e30ee 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,26 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("corsProperties"u8); writer.WriteObjectValue(CorsProperties); } + if (Optional.IsDefined(ClientAuth)) + { + writer.WritePropertyName("clientAuth"u8); + writer.WriteObjectValue(ClientAuth); + } + 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); @@ -63,6 +83,9 @@ internal static AppPlatformGatewayProperties DeserializeAppPlatformGatewayProper Optional ssoProperties = default; Optional apiMetadataProperties = default; Optional corsProperties = default; + Optional clientAuth = default; + Optional> apmTypes = default; + Optional environmentVariables = default; Optional resourceRequests = default; Optional> instances = default; Optional operatorProperties = default; @@ -138,6 +161,41 @@ internal static AppPlatformGatewayProperties DeserializeAppPlatformGatewayProper corsProperties = AppPlatformGatewayCorsProperties.DeserializeAppPlatformGatewayCorsProperties(property.Value); continue; } + if (property.NameEquals("clientAuth"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + clientAuth = GatewayPropertiesClientAuth.DeserializeGatewayPropertiesClientAuth(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) @@ -174,7 +232,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, clientAuth.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 09c39f097fdc0..306de8dbbdca5 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,13 @@ public AppPlatformGatewayProperties() /// Single sign-on related configuration. /// API metadata property for Spring Cloud Gateway. /// Cross-Origin Resource Sharing property. + /// Client-Certification Authentication. + /// 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, GatewayPropertiesClientAuth clientAuth, IList apmTypes, GatewayPropertiesEnvironmentVariables environmentVariables, AppPlatformGatewayResourceRequirements resourceRequests, IReadOnlyList instances, AppPlatformGatewayOperatorProperties operatorProperties) { ProvisioningState = provisioningState; IsPublic = isPublic; @@ -40,6 +44,9 @@ internal AppPlatformGatewayProperties(AppPlatformGatewayProvisioningState? provi SsoProperties = ssoProperties; ApiMetadataProperties = apiMetadataProperties; CorsProperties = corsProperties; + ClientAuth = clientAuth; + ApmTypes = apmTypes; + EnvironmentVariables = environmentVariables; ResourceRequests = resourceRequests; Instances = instances; OperatorProperties = operatorProperties; @@ -59,6 +66,12 @@ internal AppPlatformGatewayProperties(AppPlatformGatewayProvisioningState? provi public AppPlatformGatewayApiMetadataProperties ApiMetadataProperties { get; set; } /// Cross-Origin Resource Sharing property. public AppPlatformGatewayCorsProperties CorsProperties { get; set; } + /// Client-Certification Authentication. + public GatewayPropertiesClientAuth ClientAuth { 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 c6d3b5e408ba2..3d93c30c589d2 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(); } @@ -55,6 +80,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)) @@ -112,8 +140,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 c1b72df3d2110..d2f4687c14473 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 77f3dd4c5a9d7..d8a3ffa1c0638 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(); } @@ -45,9 +60,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)) @@ -100,6 +118,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) @@ -125,8 +153,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 1ad022d6c7298..52239cb31ca45 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. @@ -43,28 +49,22 @@ internal AppPlatformServiceProperties(AppPlatformServiceProvisioningState? provi /// Network profile of the Service. public AppPlatformServiceNetworkProfile NetworkProfile { get; set; } /// Additional Service settings in vnet injection instance. - internal ServiceVnetAddons VnetAddons { get; set; } - /// Indicates whether the log stream in vnet injection instance could be accessed from internet. - public bool? IsLogStreamPublicEndpoint - { - get => VnetAddons is null ? default : VnetAddons.IsLogStreamPublicEndpoint; - set - { - if (VnetAddons is null) - VnetAddons = new ServiceVnetAddons(); - VnetAddons.IsLogStreamPublicEndpoint = value; - } - } - + public ServiceVnetAddons VnetAddons { get; set; } /// Version of the Service. 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 0000000000000..fa75d024c9d89 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorComponent.Serialization.cs @@ -0,0 +1,61 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..9168d7d9543bf --- /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 0000000000000..398ba75b3b07c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorInstance.Serialization.cs @@ -0,0 +1,39 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..97163dfb2c5f7 --- /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 0000000000000..0b0bb3d9db2f1 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorProperties.Serialization.cs @@ -0,0 +1,61 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..5da2518ca497e --- /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 0000000000000..1f1bb55ee8a94 --- /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 0000000000000..dde8e29d022fe --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorResourceCollection.Serialization.cs @@ -0,0 +1,51 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..a9344cc368a0f --- /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 0000000000000..df761808379e9 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorResourceData.Serialization.cs @@ -0,0 +1,96 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..98bc82f2c8bf7 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationAcceleratorResourceRequests.Serialization.cs @@ -0,0 +1,50 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..b58a57ebb1420 --- /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 0000000000000..f478764d8b42f --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewComponent.Serialization.cs @@ -0,0 +1,67 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..6c29a25800d8f --- /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 0000000000000..8fe9cd85ab034 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewInstance.Serialization.cs @@ -0,0 +1,39 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..fc4594805773c --- /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 0000000000000..609f5f8267654 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewProperties.Serialization.cs @@ -0,0 +1,61 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..5e4961b7b2e8d --- /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 0000000000000..f23fa5de0dea1 --- /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 0000000000000..ca83f610b6421 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewResourceCollection.Serialization.cs @@ -0,0 +1,51 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..9145392bba897 --- /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 0000000000000..6d6a469e57acd --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewResourceData.Serialization.cs @@ -0,0 +1,80 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..dc4175fae01b4 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationLiveViewResourceRequests.Serialization.cs @@ -0,0 +1,50 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..a521a118f8f37 --- /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 ef8a8fdb5fbb0..eed4518e7bcf0 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/ContainerRegistryBasicCredentials.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryBasicCredentials.Serialization.cs new file mode 100644 index 0000000000000..5304b9f89a687 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryBasicCredentials.Serialization.cs @@ -0,0 +1,65 @@ +// 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 ContainerRegistryBasicCredentials : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("server"u8); + writer.WriteStringValue(Server); + writer.WritePropertyName("username"u8); + writer.WriteStringValue(Username); + writer.WritePropertyName("password"u8); + writer.WriteStringValue(Password); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ContainerRegistryCredentialsType); + writer.WriteEndObject(); + } + + internal static ContainerRegistryBasicCredentials DeserializeContainerRegistryBasicCredentials(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string server = default; + string username = default; + string password = default; + string type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("server"u8)) + { + server = property.Value.GetString(); + continue; + } + if (property.NameEquals("username"u8)) + { + username = property.Value.GetString(); + continue; + } + if (property.NameEquals("password"u8)) + { + password = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + } + return new ContainerRegistryBasicCredentials(type, server, username, password); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryBasicCredentials.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryBasicCredentials.cs new file mode 100644 index 0000000000000..aa196638e8ac7 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryBasicCredentials.cs @@ -0,0 +1,53 @@ +// 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 basic authentication properties for the container registry resource. + public partial class ContainerRegistryBasicCredentials : ContainerRegistryCredentials + { + /// Initializes a new instance of ContainerRegistryBasicCredentials. + /// The login server of the Container Registry. + /// The username of the Container Registry. + /// The password of the Container Registry. + /// , or is null. + public ContainerRegistryBasicCredentials(string server, string username, string password) + { + Argument.AssertNotNull(server, nameof(server)); + Argument.AssertNotNull(username, nameof(username)); + Argument.AssertNotNull(password, nameof(password)); + + Server = server; + Username = username; + Password = password; + ContainerRegistryCredentialsType = "BasicAuth"; + } + + /// Initializes a new instance of ContainerRegistryBasicCredentials. + /// The credential type of the container registry credentials. + /// The login server of the Container Registry. + /// The username of the Container Registry. + /// The password of the Container Registry. + internal ContainerRegistryBasicCredentials(string containerRegistryCredentialsType, string server, string username, string password) : base(containerRegistryCredentialsType) + { + Server = server; + Username = username; + Password = password; + ContainerRegistryCredentialsType = containerRegistryCredentialsType ?? "BasicAuth"; + } + + /// The login server of the Container Registry. + public string Server { get; set; } + /// The username of the Container Registry. + public string Username { get; set; } + /// The password of the Container Registry. + public string Password { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryCredentials.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryCredentials.Serialization.cs new file mode 100644 index 0000000000000..e84ce1aa5509e --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryCredentials.Serialization.cs @@ -0,0 +1,39 @@ +// 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 ContainerRegistryCredentials : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ContainerRegistryCredentialsType); + writer.WriteEndObject(); + } + + internal static ContainerRegistryCredentials DeserializeContainerRegistryCredentials(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "BasicAuth": return ContainerRegistryBasicCredentials.DeserializeContainerRegistryBasicCredentials(element); + } + } + return UnknownContainerRegistryCredentials.DeserializeUnknownContainerRegistryCredentials(element); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryCredentials.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryCredentials.cs new file mode 100644 index 0000000000000..91edf8d4008c0 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryCredentials.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 credential for the container registry resource. + /// 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 . + /// + public abstract partial class ContainerRegistryCredentials + { + /// Initializes a new instance of ContainerRegistryCredentials. + protected ContainerRegistryCredentials() + { + } + + /// Initializes a new instance of ContainerRegistryCredentials. + /// The credential type of the container registry credentials. + internal ContainerRegistryCredentials(string containerRegistryCredentialsType) + { + ContainerRegistryCredentialsType = containerRegistryCredentialsType; + } + + /// The credential type of the container registry credentials. + internal string ContainerRegistryCredentialsType { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryProperties.Serialization.cs new file mode 100644 index 0000000000000..7d46ba1814eb9 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryProperties.Serialization.cs @@ -0,0 +1,52 @@ +// 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 ContainerRegistryProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("credentials"u8); + writer.WriteObjectValue(Credentials); + writer.WriteEndObject(); + } + + internal static ContainerRegistryProperties DeserializeContainerRegistryProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ContainerRegistryCredentials credentials = default; + Optional provisioningState = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("credentials"u8)) + { + credentials = ContainerRegistryCredentials.DeserializeContainerRegistryCredentials(property.Value); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new ContainerRegistryProvisioningState(property.Value.GetString()); + continue; + } + } + return new ContainerRegistryProperties(credentials, Optional.ToNullable(provisioningState)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryProperties.cs new file mode 100644 index 0000000000000..89f338d0a04ce --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryProperties.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Container registry resource payload. + public partial class ContainerRegistryProperties + { + /// Initializes a new instance of ContainerRegistryProperties. + /// + /// The credentials of the container registry resource. + /// 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 . + /// + /// is null. + public ContainerRegistryProperties(ContainerRegistryCredentials credentials) + { + Argument.AssertNotNull(credentials, nameof(credentials)); + + Credentials = credentials; + } + + /// Initializes a new instance of ContainerRegistryProperties. + /// + /// The credentials of the container registry resource. + /// 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 . + /// + /// State of the Container Registry. + internal ContainerRegistryProperties(ContainerRegistryCredentials credentials, ContainerRegistryProvisioningState? provisioningState) + { + Credentials = credentials; + ProvisioningState = provisioningState; + } + + /// + /// The credentials of the container registry resource. + /// 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 . + /// + public ContainerRegistryCredentials Credentials { get; set; } + /// State of the Container Registry. + public ContainerRegistryProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryProvisioningState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryProvisioningState.cs new file mode 100644 index 0000000000000..3bea7671d9f4d --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryProvisioningState.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 Container Registry. + public readonly partial struct ContainerRegistryProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ContainerRegistryProvisioningState(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 CanceledValue = "Canceled"; + + /// Creating. + public static ContainerRegistryProvisioningState Creating { get; } = new ContainerRegistryProvisioningState(CreatingValue); + /// Updating. + public static ContainerRegistryProvisioningState Updating { get; } = new ContainerRegistryProvisioningState(UpdatingValue); + /// Succeeded. + public static ContainerRegistryProvisioningState Succeeded { get; } = new ContainerRegistryProvisioningState(SucceededValue); + /// Failed. + public static ContainerRegistryProvisioningState Failed { get; } = new ContainerRegistryProvisioningState(FailedValue); + /// Canceled. + public static ContainerRegistryProvisioningState Canceled { get; } = new ContainerRegistryProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(ContainerRegistryProvisioningState left, ContainerRegistryProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ContainerRegistryProvisioningState left, ContainerRegistryProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ContainerRegistryProvisioningState(string value) => new ContainerRegistryProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ContainerRegistryProvisioningState other && Equals(other); + /// + public bool Equals(ContainerRegistryProvisioningState 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/ContainerRegistryResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryResourceCollection.Serialization.cs new file mode 100644 index 0000000000000..2122315a0e2fe --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryResourceCollection.Serialization.cs @@ -0,0 +1,51 @@ +// 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 ContainerRegistryResourceCollection + { + internal static ContainerRegistryResourceCollection DeserializeContainerRegistryResourceCollection(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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(ContainerRegistryResourceData.DeserializeContainerRegistryResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new ContainerRegistryResourceCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryResourceCollection.cs new file mode 100644 index 0000000000000..3e3d4ae035248 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryResourceCollection.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 +{ + /// Collection compose of container registry resources list and a possible link for next page. + internal partial class ContainerRegistryResourceCollection + { + /// Initializes a new instance of ContainerRegistryResourceCollection. + internal ContainerRegistryResourceCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of ContainerRegistryResourceCollection. + /// The container registry resources list. + /// The link to next page of storage list. + internal ContainerRegistryResourceCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// The container registry resources list. + public IReadOnlyList Value { get; } + /// The link to next page of storage list. + public string NextLink { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryResourceData.Serialization.cs new file mode 100644 index 0000000000000..ff7d1cc2f0cf8 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerRegistryResourceData.Serialization.cs @@ -0,0 +1,80 @@ +// 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 ContainerRegistryResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + + internal static ContainerRegistryResourceData DeserializeContainerRegistryResourceData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 = ContainerRegistryProperties.DeserializeContainerRegistryProperties(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 ContainerRegistryResourceData(id, name, type, systemData.Value, properties.Value); + } + } +} 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 0000000000000..6e5a47ec25de7 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomScaleRule.Serialization.cs @@ -0,0 +1,98 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..b77ed4a91fa77 --- /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 0000000000000..328b8f239c800 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorProperties.Serialization.cs @@ -0,0 +1,118 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..1e6cbd39df2bb --- /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 0000000000000..8bfafc054531e --- /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 0000000000000..b9181787c9e06 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorResourceCollection.Serialization.cs @@ -0,0 +1,51 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..53b0afa6dfabd --- /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 0000000000000..b5c07be51f9bf --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorResourceData.Serialization.cs @@ -0,0 +1,96 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..be11e50e3a289 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomizedAcceleratorValidateResult.Serialization.cs @@ -0,0 +1,44 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..769bbd98b44c1 --- /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 0000000000000..1b7dbecd7d43a --- /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 0000000000000..3da5704f478ba --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalFeatureDetail.Serialization.cs @@ -0,0 +1,55 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..c4efaea326b6d --- /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 0000000000000..c5f37de88086f --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalFeatureSettings.Serialization.cs @@ -0,0 +1,65 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..ca24c617edb4b --- /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 0000000000000..7057e8d09185d --- /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 0000000000000..97f43533fa07f --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalInstance.Serialization.cs @@ -0,0 +1,39 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..4244bba2b4c34 --- /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 0000000000000..4b3c98b5ed417 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalProperties.Serialization.cs @@ -0,0 +1,132 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..2fb9d2fa4ec08 --- /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 0000000000000..9020ed498597c --- /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 0000000000000..ece44649bce3d --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalResourceCollection.Serialization.cs @@ -0,0 +1,51 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..906e70a45bf9c --- /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 0000000000000..d9f58394f7da1 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalResourceData.Serialization.cs @@ -0,0 +1,80 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..3c73e772e0bc4 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalResourceRequests.Serialization.cs @@ -0,0 +1,50 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..43ddf3e48b5f0 --- /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 0000000000000..f23592adc4305 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DevToolPortalSsoProperties.Serialization.cs @@ -0,0 +1,99 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..c5561e4534542 --- /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/GatewayCertificateVerification.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCertificateVerification.cs new file mode 100644 index 0000000000000..3f0756f2cb4d5 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCertificateVerification.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 +{ + /// Whether to enable certificate verification or not. + public readonly partial struct GatewayCertificateVerification : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public GatewayCertificateVerification(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Enable certificate verification in Spring Cloud Gateway. + public static GatewayCertificateVerification Enabled { get; } = new GatewayCertificateVerification(EnabledValue); + /// Disable certificate verification in Spring Cloud Gateway. + public static GatewayCertificateVerification Disabled { get; } = new GatewayCertificateVerification(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(GatewayCertificateVerification left, GatewayCertificateVerification right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(GatewayCertificateVerification left, GatewayCertificateVerification right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator GatewayCertificateVerification(string value) => new GatewayCertificateVerification(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is GatewayCertificateVerification other && Equals(other); + /// + public bool Equals(GatewayCertificateVerification 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/GatewayPropertiesClientAuth.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayPropertiesClientAuth.Serialization.cs new file mode 100644 index 0000000000000..dd8762b143c59 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayPropertiesClientAuth.Serialization.cs @@ -0,0 +1,76 @@ +// 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 GatewayPropertiesClientAuth : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Certificates)) + { + writer.WritePropertyName("certificates"u8); + writer.WriteStartArray(); + foreach (var item in Certificates) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(CertificateVerification)) + { + writer.WritePropertyName("certificateVerification"u8); + writer.WriteStringValue(CertificateVerification.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static GatewayPropertiesClientAuth DeserializeGatewayPropertiesClientAuth(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> certificates = default; + Optional certificateVerification = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("certificates"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()); + } + certificates = array; + continue; + } + if (property.NameEquals("certificateVerification"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + certificateVerification = new GatewayCertificateVerification(property.Value.GetString()); + continue; + } + } + return new GatewayPropertiesClientAuth(Optional.ToList(certificates), Optional.ToNullable(certificateVerification)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayPropertiesClientAuth.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayPropertiesClientAuth.cs new file mode 100644 index 0000000000000..572632c03e010 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayPropertiesClientAuth.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 +{ + /// Client-Certification Authentication. + public partial class GatewayPropertiesClientAuth + { + /// Initializes a new instance of GatewayPropertiesClientAuth. + public GatewayPropertiesClientAuth() + { + Certificates = new ChangeTrackingList(); + } + + /// Initializes a new instance of GatewayPropertiesClientAuth. + /// Collection of certificate resource Ids in Azure Spring Apps. + /// Whether to enable certificate verification or not. + internal GatewayPropertiesClientAuth(IList certificates, GatewayCertificateVerification? certificateVerification) + { + Certificates = certificates; + CertificateVerification = certificateVerification; + } + + /// Collection of certificate resource Ids in Azure Spring Apps. + public IList Certificates { get; } + /// Whether to enable certificate verification or not. + public GatewayCertificateVerification? CertificateVerification { 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 0000000000000..f1bfc2f85afcc --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayPropertiesEnvironmentVariables.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 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..8670108a3c843 --- /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 0000000000000..a04e95cf4a4ed --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/HttpScaleRule.Serialization.cs @@ -0,0 +1,87 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..32d79adf4f6c1 --- /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 0000000000000..cb488b72e9399 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MarketplaceResource.Serialization.cs @@ -0,0 +1,66 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..77ebd7ec48dc1 --- /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 0000000000000..2244085a595c3 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorProperties.Serialization.cs @@ -0,0 +1,101 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..7c1c74de84523 --- /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 0000000000000..1eb48535cf7e2 --- /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 0000000000000..39950a03f9dbc --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorResourceCollection.Serialization.cs @@ -0,0 +1,51 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..0ca7ef43aab04 --- /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 0000000000000..e89d5d1eed07f --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PredefinedAcceleratorResourceData.Serialization.cs @@ -0,0 +1,96 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..e9c3ed5a34955 --- /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 0000000000000..87bd79d595ad0 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/QueueScaleRule.Serialization.cs @@ -0,0 +1,87 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..37bbd9068d07f --- /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 0000000000000..9956d2b13f861 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Scale.Serialization.cs @@ -0,0 +1,92 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..8bdcf460394b7 --- /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 0000000000000..14a3f02849592 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ScaleRule.Serialization.cs @@ -0,0 +1,108 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..934b6c4418216 --- /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 0000000000000..54b24d2c65afc --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ScaleRuleAuth.Serialization.cs @@ -0,0 +1,55 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..2c3b429d3305b --- /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 0000000000000..2ce1cf0b1f73e --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Secret.Serialization.cs @@ -0,0 +1,55 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..0e18d81c7d800 --- /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/ServiceVnetAddons.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceVnetAddons.Serialization.cs index 0b70b69a50854..ca17ad39a8a37 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceVnetAddons.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceVnetAddons.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.AppPlatform.Models { - internal partial class ServiceVnetAddons : IUtf8JsonSerializable + public partial class ServiceVnetAddons : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -20,6 +20,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("logStreamPublicEndpoint"u8); writer.WriteBooleanValue(IsLogStreamPublicEndpoint.Value); } + if (Optional.IsDefined(DataPlanePublicEndpoint)) + { + writer.WritePropertyName("dataPlanePublicEndpoint"u8); + writer.WriteBooleanValue(DataPlanePublicEndpoint.Value); + } writer.WriteEndObject(); } @@ -30,6 +35,7 @@ internal static ServiceVnetAddons DeserializeServiceVnetAddons(JsonElement eleme return null; } Optional logStreamPublicEndpoint = default; + Optional dataPlanePublicEndpoint = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("logStreamPublicEndpoint"u8)) @@ -42,8 +48,18 @@ internal static ServiceVnetAddons DeserializeServiceVnetAddons(JsonElement eleme logStreamPublicEndpoint = property.Value.GetBoolean(); continue; } + if (property.NameEquals("dataPlanePublicEndpoint"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + dataPlanePublicEndpoint = property.Value.GetBoolean(); + continue; + } } - return new ServiceVnetAddons(Optional.ToNullable(logStreamPublicEndpoint)); + return new ServiceVnetAddons(Optional.ToNullable(logStreamPublicEndpoint), Optional.ToNullable(dataPlanePublicEndpoint)); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceVnetAddons.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceVnetAddons.cs index 7fe5551b442be..250ce33715204 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceVnetAddons.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceVnetAddons.cs @@ -8,7 +8,7 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Additional Service settings in vnet injection instance. - internal partial class ServiceVnetAddons + public partial class ServiceVnetAddons { /// Initializes a new instance of ServiceVnetAddons. public ServiceVnetAddons() @@ -17,12 +17,16 @@ public ServiceVnetAddons() /// Initializes a new instance of ServiceVnetAddons. /// Indicates whether the log stream in vnet injection instance could be accessed from internet. - internal ServiceVnetAddons(bool? isLogStreamPublicEndpoint) + /// Indicates whether the data plane components(log stream, app connect, remote debugging) in vnet injection instance could be accessed from internet. + internal ServiceVnetAddons(bool? isLogStreamPublicEndpoint, bool? dataPlanePublicEndpoint) { IsLogStreamPublicEndpoint = isLogStreamPublicEndpoint; + DataPlanePublicEndpoint = dataPlanePublicEndpoint; } /// Indicates whether the log stream in vnet injection instance could be accessed from internet. public bool? IsLogStreamPublicEndpoint { get; set; } + /// Indicates whether the data plane components(log stream, app connect, remote debugging) in vnet injection instance could be accessed from internet. + public bool? DataPlanePublicEndpoint { 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 0000000000000..20ce02925c5e7 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TcpScaleRule.Serialization.cs @@ -0,0 +1,87 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..739958c08d7f3 --- /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 0000000000000..6e3476946ceda --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UnknownAcceleratorAuthSetting.Serialization.cs @@ -0,0 +1,41 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + 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 0000000000000..40b0348d7d4cc --- /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/UnknownContainerRegistryCredentials.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UnknownContainerRegistryCredentials.Serialization.cs new file mode 100644 index 0000000000000..b2bfa232c8372 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UnknownContainerRegistryCredentials.Serialization.cs @@ -0,0 +1,41 @@ +// 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 UnknownContainerRegistryCredentials : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ContainerRegistryCredentialsType); + writer.WriteEndObject(); + } + + internal static UnknownContainerRegistryCredentials DeserializeUnknownContainerRegistryCredentials(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string type = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + } + return new UnknownContainerRegistryCredentials(type); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UnknownContainerRegistryCredentials.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UnknownContainerRegistryCredentials.cs new file mode 100644 index 0000000000000..8db8c9d7c4607 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UnknownContainerRegistryCredentials.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 UnknownContainerRegistryCredentials. + internal partial class UnknownContainerRegistryCredentials : ContainerRegistryCredentials + { + /// Initializes a new instance of UnknownContainerRegistryCredentials. + /// The credential type of the container registry credentials. + internal UnknownContainerRegistryCredentials(string containerRegistryCredentialsType) : base(containerRegistryCredentialsType) + { + ContainerRegistryCredentialsType = containerRegistryCredentialsType ?? "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 27d98882974fe..61b2b876f8894 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); @@ -47,6 +52,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()) { @@ -70,6 +76,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) @@ -86,7 +102,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 7ca17a92f1fde..5e3d74f4f7c58 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 0000000000000..4ed8cba4becbc --- /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 0000000000000..b48703775435b --- /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 0000000000000..bcd3431f38be5 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/PredefinedAcceleratorResourceData.cs @@ -0,0 +1,43 @@ +// 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. + /// Predefined accelerator resource + /// + 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 0ea6335243d03..82e108a0c8064 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-03-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 d6c8c3917ed47..f3456ce2ab153 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-03-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 0000000000000..e375ec3eab400 --- /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-03-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 0000000000000..3673068c1bf75 --- /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-03-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 160d692a60dc3..327bfc88a7621 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-03-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 672044b30b04b..639867f5d8d40 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-03-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 2254863cc7212..106b8c025c920 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-03-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 56e94fb3cab17..53fe518efb3ff 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-03-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 9240eab733474..f3f3407c35476 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-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -204,6 +204,90 @@ public Response GetBuildService(string subscription } } + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, AppPlatformBuildServiceData 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("/buildServices/", false); + uri.AppendPath(buildServiceName, 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 a build service resource. + /// 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 build service resource. + /// Parameters for the create 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 buildServiceName, AppPlatformBuildServiceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, 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 a build service resource. + /// 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 build service resource. + /// Parameters for the create 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 buildServiceName, AppPlatformBuildServiceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateListBuildsRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName) { var message = _pipeline.CreateMessage(); @@ -483,6 +567,90 @@ public Response CreateOrUpdateBuild(string subscriptionId, } } + internal HttpMessage CreateDeleteBuildRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName) + { + 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("/buildServices/", false); + uri.AppendPath(buildServiceName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// delete a KPack build. + /// 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 build service resource. + /// The name of the build resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteBuildAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var message = CreateDeleteBuildRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, buildName); + 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 a KPack build. + /// 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 build service resource. + /// The name of the build resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response DeleteBuild(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var message = CreateDeleteBuildRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, buildName); + _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 CreateListBuildResultsRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName) { var message = _pipeline.CreateMessage(); 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 638802ed49513..89de478189953 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-03-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 22c10796a43f7..b2f3386940185 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-03-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 6776bacd8b3ae..adf6d1daab303 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-03-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 258c4f0940959..75a7db9b82f5a 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-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ContainerRegistriesRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ContainerRegistriesRestOperations.cs new file mode 100644 index 0000000000000..1ca3facc9f8be --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ContainerRegistriesRestOperations.cs @@ -0,0 +1,367 @@ +// 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 ContainerRegistriesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ContainerRegistriesRestOperations. + /// 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 ContainerRegistriesRestOperations(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-03-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("/containerRegistries", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List container registries resource. + /// 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.ContainerRegistryResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.ContainerRegistryResourceCollection.DeserializeContainerRegistryResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List container registries resource. + /// 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.ContainerRegistryResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.ContainerRegistryResourceCollection.DeserializeContainerRegistryResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string containerRegistryName) + { + 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("/containerRegistries/", false); + uri.AppendPath(containerRegistryName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the container registries resource. + /// 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 container registry. + /// 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 containerRegistryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(containerRegistryName, nameof(containerRegistryName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, containerRegistryName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ContainerRegistryResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ContainerRegistryResourceData.DeserializeContainerRegistryResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ContainerRegistryResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the container registries resource. + /// 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 container registry. + /// 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 containerRegistryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(containerRegistryName, nameof(containerRegistryName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, containerRegistryName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ContainerRegistryResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ContainerRegistryResourceData.DeserializeContainerRegistryResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ContainerRegistryResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string containerRegistryName, ContainerRegistryResourceData 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("/containerRegistries/", false); + uri.AppendPath(containerRegistryName, 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 container registry resource. + /// 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 container registry. + /// 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 containerRegistryName, ContainerRegistryResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(containerRegistryName, nameof(containerRegistryName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, containerRegistryName, 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 container registry resource. + /// 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 container registry. + /// 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 containerRegistryName, ContainerRegistryResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(containerRegistryName, nameof(containerRegistryName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, containerRegistryName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + 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; + } + + /// List container registries resource. + /// 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.ContainerRegistryResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.ContainerRegistryResourceCollection.DeserializeContainerRegistryResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List container registries resource. + /// 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.ContainerRegistryResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.ContainerRegistryResourceCollection.DeserializeContainerRegistryResourceCollection(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/CustomDomainsRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/CustomDomainsRestOperations.cs index f27e49a857e60..bb0302c10fc65 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-03-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 0000000000000..143a92b5cef74 --- /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-03-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 7536866a032db..ea18e9e1cff49 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-03-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 0000000000000..16b31d06929ef --- /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-03-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 a21ef0526d1cb..8b3e8a6bed54d 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-03-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 dbf6ee0c9f46d..958639e2973ff 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-03-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 3b837ba509d09..16834d0820f94 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-03-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,178 @@ 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 CreateRestartRequest(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("/restart", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Restart the 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 RestartAsync(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 = CreateRestartRequest(subscriptionId, resourceGroupName, serviceName, gatewayName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Restart the 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 Restart(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 = CreateRestartRequest(subscriptionId, resourceGroupName, serviceName, gatewayName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return 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 e560ce25580f0..5b35cc03e3d9b 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-03-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 0000000000000..a618de6265e7f --- /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-03-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 ae8cf1376bd18..527c043ddea65 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-03-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 e8b5a85285b3e..aa3bde38e5432 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-03-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 020811713b3c0..11b3d3dd8ba59 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-03-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 adcddc9879a7f..d8e29e4eb5300 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-03-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 f19ec274674c8..bf87eefccb458 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-03-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 224c607cadbf7..c4dadbc97d957 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