From 538239535e507ffe05063457df37f7b0966d4f37 Mon Sep 17 00:00:00 2001 From: Arthur Ma Date: Wed, 1 Jun 2022 16:57:24 +0800 Subject: [PATCH 1/9] Initial Azure.ResourceManager.AppPlatform --- .../Azure.ResourceManager.AppPlatform.sln | 51 + .../CHANGELOG.md | 15 + .../Directory.Build.props | 6 + .../README.md | 76 + ...ourceManager.AppPlatform.netstandard2.0.cs | 2133 +++++++++++++++++ .../Azure.ResourceManager.AppPlatform.csproj | 8 + .../ApiPortalCustomDomainResource.cs | 249 ++ ...ApiPortalCustomDomainResourceCollection.cs | 333 +++ .../ApiPortalCustomDomainResourceData.cs | 47 + .../src/Generated/ApiPortalResource.cs | 339 +++ .../Generated/ApiPortalResourceCollection.cs | 333 +++ .../src/Generated/ApiPortalResourceData.cs | 40 + .../src/Generated/AppResource.cs | 519 ++++ .../src/Generated/AppResourceCollection.cs | 337 +++ .../src/Generated/AppResourceData.cs | 44 + .../src/Generated/BindingResource.cs | 249 ++ .../Generated/BindingResourceCollection.cs | 333 +++ .../src/Generated/BindingResourceData.cs | 36 + .../src/Generated/BuildCollection.cs | 333 +++ .../src/Generated/BuildData.cs | 36 + .../src/Generated/BuildResource.cs | 234 ++ .../src/Generated/BuildResultCollection.cs | 267 +++ .../src/Generated/BuildResultData.cs | 36 + .../src/Generated/BuildResultResource.cs | 182 ++ .../BuildServiceAgentPoolResource.cs | 197 ++ ...BuildServiceAgentPoolResourceCollection.cs | 333 +++ .../BuildServiceAgentPoolResourceData.cs | 36 + .../src/Generated/BuildServiceCollection.cs | 267 +++ .../src/Generated/BuildServiceData.cs | 36 + .../src/Generated/BuildServiceResource.cs | 367 +++ .../src/Generated/BuilderResource.cs | 286 +++ .../Generated/BuilderResourceCollection.cs | 333 +++ .../src/Generated/BuilderResourceData.cs | 36 + .../src/Generated/BuildpackBindingResource.cs | 249 ++ .../BuildpackBindingResourceCollection.cs | 333 +++ .../Generated/BuildpackBindingResourceData.cs | 36 + .../src/Generated/CertificateResource.cs | 249 ++ .../CertificateResourceCollection.cs | 333 +++ .../src/Generated/CertificateResourceData.cs | 36 + .../src/Generated/ConfigServerResource.cs | 257 ++ .../src/Generated/ConfigServerResourceData.cs | 36 + .../Generated/ConfigurationServiceResource.cs | 310 +++ .../ConfigurationServiceResourceCollection.cs | 333 +++ .../ConfigurationServiceResourceData.cs | 36 + .../src/Generated/CustomDomainResource.cs | 249 ++ .../CustomDomainResourceCollection.cs | 333 +++ .../src/Generated/CustomDomainResourceData.cs | 36 + .../src/Generated/DeploymentResource.cs | 630 +++++ .../Generated/DeploymentResourceCollection.cs | 335 +++ .../src/Generated/DeploymentResourceData.cs | 40 + .../Extensions/AppPlatformExtensions.cs | 657 +++++ .../ResourceGroupResourceExtensionClient.cs | 41 + .../SubscriptionResourceExtensionClient.cs | 267 +++ .../TenantResourceExtensionClient.cs | 100 + .../Generated/GatewayCustomDomainResource.cs | 249 ++ .../GatewayCustomDomainResourceCollection.cs | 333 +++ .../GatewayCustomDomainResourceData.cs | 47 + .../src/Generated/GatewayResource.cs | 376 +++ .../Generated/GatewayResourceCollection.cs | 333 +++ .../src/Generated/GatewayResourceData.cs | 40 + .../Generated/GatewayRouteConfigResource.cs | 249 ++ .../GatewayRouteConfigResourceCollection.cs | 333 +++ .../GatewayRouteConfigResourceData.cs | 36 + ...rtalCustomDomainResourceOperationSource.cs | 40 + .../ApiPortalResourceOperationSource.cs | 40 + .../AppPlatformArmOperation.cs | 69 + .../AppPlatformArmOperationOfT.cs | 75 + .../AppResourceOperationSource.cs | 40 + .../BindingResourceOperationSource.cs | 40 + ...ServiceAgentPoolResourceOperationSource.cs | 40 + .../BuilderResourceOperationSource.cs | 40 + ...BuildpackBindingResourceOperationSource.cs | 40 + .../CertificateResourceOperationSource.cs | 40 + .../ConfigServerResourceOperationSource.cs | 40 + ...erSettingsValidateResultOperationSource.cs | 31 + ...igurationServiceResourceOperationSource.cs | 40 + ...ceSettingsValidateResultOperationSource.cs | 31 + .../CustomDomainResourceOperationSource.cs | 40 + .../DeploymentResourceOperationSource.cs | 40 + ...ewayCustomDomainResourceOperationSource.cs | 40 + .../GatewayResourceOperationSource.cs | 40 + ...tewayRouteConfigResourceOperationSource.cs | 40 + ...onitoringSettingResourceOperationSource.cs | 40 + .../ServiceRegistryResourceOperationSource.cs | 40 + .../ServiceResourceOperationSource.cs | 40 + .../StorageResourceOperationSource.cs | 40 + ...ctiveDeploymentCollection.Serialization.cs | 31 + .../Models/ActiveDeploymentCollection.cs | 25 + ...talCustomDomainProperties.Serialization.cs | 40 + .../Models/ApiPortalCustomDomainProperties.cs | 28 + ...mDomainResourceCollection.Serialization.cs | 47 + ...ApiPortalCustomDomainResourceCollection.cs | 43 + ...lCustomDomainResourceData.Serialization.cs | 71 + .../Models/ApiPortalInstance.Serialization.cs | 35 + .../src/Generated/Models/ApiPortalInstance.cs | 32 + .../ApiPortalProperties.Serialization.cs | 180 ++ .../Generated/Models/ApiPortalProperties.cs | 67 + .../Models/ApiPortalProvisioningState.cs | 60 + ...iPortalResourceCollection.Serialization.cs | 47 + .../Models/ApiPortalResourceCollection.cs | 43 + .../ApiPortalResourceData.Serialization.cs | 87 + ...ApiPortalResourceRequests.Serialization.cs | 35 + .../Models/ApiPortalResourceRequests.cs | 32 + .../Models/AppPlatformSku.Serialization.cs | 67 + .../src/Generated/Models/AppPlatformSku.cs | 36 + .../AppResourceCollection.Serialization.cs | 47 + .../Generated/Models/AppResourceCollection.cs | 43 + .../Models/AppResourceData.Serialization.cs | 105 + .../AppResourceProperties.Serialization.cs | 238 ++ .../Generated/Models/AppResourceProperties.cs | 75 + .../Models/AppResourceProvisioningState.cs | 60 + ...tionInsightsAgentVersions.Serialization.cs | 35 + .../ApplicationInsightsAgentVersions.cs | 28 + .../AvailableRuntimeVersions.Serialization.cs | 40 + .../Models/AvailableRuntimeVersions.cs | 32 + .../Models/AzureFileVolume.Serialization.cs | 96 + .../src/Generated/Models/AzureFileVolume.cs | 50 + ...BindingResourceCollection.Serialization.cs | 47 + .../Models/BindingResourceCollection.cs | 43 + .../BindingResourceData.Serialization.cs | 71 + ...BindingResourceProperties.Serialization.cs | 119 + .../Models/BindingResourceProperties.cs | 61 + .../src/Generated/Models/BindingType.cs | 63 + .../Models/BuildCollection.Serialization.cs | 47 + .../src/Generated/Models/BuildCollection.cs | 43 + .../Models/BuildData.Serialization.cs | 71 + .../Models/BuildProperties.Serialization.cs | 113 + .../src/Generated/Models/BuildProperties.cs | 58 + .../Models/BuildProvisioningState.cs | 60 + .../BuildResultCollection.Serialization.cs | 47 + .../Generated/Models/BuildResultCollection.cs | 43 + .../Models/BuildResultData.Serialization.cs | 71 + .../Models/BuildResultLog.Serialization.cs | 35 + .../src/Generated/Models/BuildResultLog.cs | 30 + .../BuildResultProperties.Serialization.cs | 79 + .../Generated/Models/BuildResultProperties.cs | 44 + .../Models/BuildResultProvisioningState.cs | 60 + ...BuildResultUserSourceInfo.Serialization.cs | 59 + .../Models/BuildResultUserSourceInfo.cs | 32 + ...erviceAgentPoolProperties.Serialization.cs | 51 + .../Models/BuildServiceAgentPoolProperties.cs | 32 + ...entPoolResourceCollection.Serialization.cs | 47 + ...BuildServiceAgentPoolResourceCollection.cs | 43 + ...viceAgentPoolResourceData.Serialization.cs | 71 + ...ceAgentPoolSizeProperties.Serialization.cs | 52 + .../BuildServiceAgentPoolSizeProperties.cs | 36 + .../BuildServiceCollection.Serialization.cs | 47 + .../Models/BuildServiceCollection.cs | 43 + .../Models/BuildServiceData.Serialization.cs | 71 + .../BuildServiceProperties.Serialization.cs | 67 + .../Models/BuildServiceProperties.cs | 36 + ...ropertiesResourceRequests.Serialization.cs | 41 + .../BuildServicePropertiesResourceRequests.cs | 32 + .../Models/BuildServiceProvisioningState.cs | 60 + .../BuildStageProperties.Serialization.cs | 40 + .../Generated/Models/BuildStageProperties.cs | 32 + .../Models/BuilderProperties.Serialization.cs | 83 + .../src/Generated/Models/BuilderProperties.cs | 40 + .../Models/BuilderProvisioningState.cs | 60 + ...BuilderResourceCollection.Serialization.cs | 47 + .../Models/BuilderResourceCollection.cs | 43 + .../BuilderResourceData.Serialization.cs | 71 + ...ckBindingLaunchProperties.Serialization.cs | 84 + .../BuildpackBindingLaunchProperties.cs | 37 + ...uildpackBindingProperties.Serialization.cs | 72 + .../Models/BuildpackBindingProperties.cs | 36 + .../BuildpackBindingProvisioningState.cs | 60 + ...BindingResourceCollection.Serialization.cs | 47 + .../BuildpackBindingResourceCollection.cs | 43 + ...ldpackBindingResourceData.Serialization.cs | 71 + ...BuildpacksGroupProperties.Serialization.cs | 68 + .../Models/BuildpacksGroupProperties.cs | 37 + .../CertificateProperties.Serialization.cs | 98 + .../Generated/Models/CertificateProperties.cs | 60 + ...ificateResourceCollection.Serialization.cs | 47 + .../Models/CertificateResourceCollection.cs | 37 + .../CertificateResourceData.Serialization.cs | 71 + ...ClusterResourceProperties.Serialization.cs | 106 + .../Models/ClusterResourceProperties.cs | 52 + .../ConfigServerGitProperty.Serialization.cs | 173 ++ .../Models/ConfigServerGitProperty.cs | 78 + .../ConfigServerProperties.Serialization.cs | 72 + .../Models/ConfigServerProperties.cs | 47 + .../ConfigServerResourceData.Serialization.cs | 71 + .../ConfigServerSettings.Serialization.cs | 45 + .../Generated/Models/ConfigServerSettings.cs | 28 + ...ServerSettingsErrorRecord.Serialization.cs | 58 + .../Models/ConfigServerSettingsErrorRecord.cs | 41 + ...verSettingsValidateResult.Serialization.cs | 51 + .../ConfigServerSettingsValidateResult.cs | 36 + .../src/Generated/Models/ConfigServerState.cs | 60 + ...urationServiceGitProperty.Serialization.cs | 56 + .../Models/ConfigurationServiceGitProperty.cs | 32 + ...GitPropertyValidateResult.Serialization.cs | 51 + ...urationServiceGitPropertyValidateResult.cs | 36 + ...ationServiceGitRepository.Serialization.cs | 170 ++ .../ConfigurationServiceGitRepository.cs | 100 + ...figurationServiceInstance.Serialization.cs | 35 + .../Models/ConfigurationServiceInstance.cs | 32 + ...gurationServiceProperties.Serialization.cs | 84 + .../Models/ConfigurationServiceProperties.cs | 54 + .../ConfigurationServiceProvisioningState.cs | 60 + ...ServiceResourceCollection.Serialization.cs | 47 + .../ConfigurationServiceResourceCollection.cs | 43 + ...rationServiceResourceData.Serialization.cs | 71 + ...onServiceResourceRequests.Serialization.cs | 46 + .../ConfigurationServiceResourceRequests.cs | 36 + ...figurationServiceSettings.Serialization.cs | 45 + .../Models/ConfigurationServiceSettings.cs | 40 + ...iceSettingsValidateResult.Serialization.cs | 34 + ...figurationServiceSettingsValidateResult.cs | 28 + .../ContainerProbeSettings.Serialization.cs | 45 + .../Models/ContainerProbeSettings.cs | 28 + ...tentCertificateProperties.Serialization.cs | 101 + .../Models/ContentCertificateProperties.cs | 40 + .../Models/CustomContainer.Serialization.cs | 131 + .../src/Generated/Models/CustomContainer.cs | 53 + ...omContainerUserSourceInfo.Serialization.cs | 64 + .../Models/CustomContainerUserSourceInfo.cs | 32 + .../CustomDomainProperties.Serialization.cs | 57 + .../Models/CustomDomainProperties.cs | 36 + ...mDomainResourceCollection.Serialization.cs | 47 + .../Models/CustomDomainResourceCollection.cs | 37 + .../CustomDomainResourceData.Serialization.cs | 71 + ...stomDomainValidatePayload.Serialization.cs | 23 + .../Models/CustomDomainValidatePayload.cs | 31 + ...ustomDomainValidateResult.Serialization.cs | 40 + .../Models/CustomDomainValidateResult.cs | 32 + ...mPersistentDiskProperties.Serialization.cs | 95 + .../Models/CustomPersistentDiskProperties.cs | 53 + ...tomPersistentDiskResource.Serialization.cs | 53 + .../Models/CustomPersistentDiskResource.cs | 42 + .../DeploymentInstance.Serialization.cs | 59 + .../Generated/Models/DeploymentInstance.cs | 48 + ...loymentResourceCollection.Serialization.cs | 47 + .../Models/DeploymentResourceCollection.cs | 43 + .../DeploymentResourceData.Serialization.cs | 87 + ...loymentResourceProperties.Serialization.cs | 116 + .../Models/DeploymentResourceProperties.cs | 52 + .../DeploymentResourceProvisioningState.cs | 57 + .../Models/DeploymentResourceStatus.cs | 51 + .../DeploymentSettings.Serialization.cs | 132 + .../Generated/Models/DeploymentSettings.cs | 57 + .../DiagnosticParameters.Serialization.cs | 36 + .../Generated/Models/DiagnosticParameters.cs | 25 + .../Generated/Models/Error.Serialization.cs | 51 + .../src/Generated/Models/Error.cs | 32 + ...ewayApiMetadataProperties.Serialization.cs | 90 + .../Models/GatewayApiMetadataProperties.cs | 46 + .../Models/GatewayApiRoute.Serialization.cs | 195 ++ .../src/Generated/Models/GatewayApiRoute.cs | 67 + .../GatewayCorsProperties.Serialization.cs | 166 ++ .../Generated/Models/GatewayCorsProperties.cs | 55 + ...wayCustomDomainProperties.Serialization.cs | 40 + .../Models/GatewayCustomDomainProperties.cs | 28 + ...mDomainResourceCollection.Serialization.cs | 47 + .../GatewayCustomDomainResourceCollection.cs | 43 + ...yCustomDomainResourceData.Serialization.cs | 71 + .../Models/GatewayInstance.Serialization.cs | 35 + .../src/Generated/Models/GatewayInstance.cs | 32 + ...GatewayOperatorProperties.Serialization.cs | 51 + .../Models/GatewayOperatorProperties.cs | 36 + ...yOperatorResourceRequests.Serialization.cs | 46 + .../Models/GatewayOperatorResourceRequests.cs | 36 + .../Models/GatewayProperties.Serialization.cs | 176 ++ .../src/Generated/Models/GatewayProperties.cs | 69 + .../Models/GatewayProvisioningState.cs | 60 + ...GatewayResourceCollection.Serialization.cs | 47 + .../Models/GatewayResourceCollection.cs | 43 + .../GatewayResourceData.Serialization.cs | 87 + .../GatewayResourceRequests.Serialization.cs | 51 + .../Models/GatewayResourceRequests.cs | 32 + ...ewayRouteConfigProperties.Serialization.cs | 78 + .../Models/GatewayRouteConfigProperties.cs | 40 + ...eConfigResourceCollection.Serialization.cs | 47 + .../GatewayRouteConfigResourceCollection.cs | 43 + ...ayRouteConfigResourceData.Serialization.cs | 71 + .../GitPatternRepository.Serialization.cs | 181 ++ .../Generated/Models/GitPatternRepository.cs | 88 + .../ImageRegistryCredential.Serialization.cs | 51 + .../Models/ImageRegistryCredential.cs | 32 + ...JarUploadedUserSourceInfo.Serialization.cs | 81 + .../Models/JarUploadedUserSourceInfo.cs | 37 + .../KPackBuildStageProvisioningState.cs | 57 + ...aultCertificateProperties.Serialization.cs | 134 ++ .../Models/KeyVaultCertificateProperties.cs | 67 + .../Models/LoadedCertificate.Serialization.cs | 53 + .../src/Generated/Models/LoadedCertificate.cs | 43 + .../LogFileUrlResponse.Serialization.cs | 30 + .../Generated/Models/LogFileUrlResponse.cs | 31 + ...nitoringSettingProperties.Serialization.cs | 115 + .../Models/MonitoringSettingProperties.cs | 53 + ...toringSettingResourceData.Serialization.cs | 71 + .../Models/MonitoringSettingState.cs | 57 + .../Models/NameAvailability.Serialization.cs | 46 + .../src/Generated/Models/NameAvailability.cs | 36 + .../NameAvailabilityContent.Serialization.cs | 25 + .../Models/NameAvailabilityContent.cs | 39 + ...ZipUploadedUserSourceInfo.Serialization.cs | 81 + .../NetCoreZipUploadedUserSourceInfo.cs | 37 + .../Models/NetworkProfile.Serialization.cs | 122 + .../src/Generated/Models/NetworkProfile.cs | 62 + ...NetworkProfileOutboundIPs.Serialization.cs | 40 + .../Models/NetworkProfileOutboundIPs.cs | 32 + .../Models/PersistentDisk.Serialization.cs | 67 + .../src/Generated/Models/PersistentDisk.cs | 36 + .../src/Generated/Models/PowerState.cs | 51 + .../src/Generated/Models/ProvisioningState.cs | 78 + ...rateTestKeyRequestPayload.Serialization.cs | 23 + .../Models/RegenerateTestKeyRequestPayload.cs | 23 + .../Models/RequiredTraffic.Serialization.cs | 84 + .../src/Generated/Models/RequiredTraffic.cs | 49 + .../Models/ResourceRequests.Serialization.cs | 51 + .../src/Generated/Models/ResourceRequests.cs | 32 + .../Models/ResourceSku.Serialization.cs | 101 + .../src/Generated/Models/ResourceSku.cs | 64 + .../ResourceSkuCapabilities.Serialization.cs | 35 + .../Models/ResourceSkuCapabilities.cs | 32 + .../ResourceSkuCollection.Serialization.cs | 46 + .../Generated/Models/ResourceSkuCollection.cs | 42 + .../ResourceSkuLocationInfo.Serialization.cs | 67 + .../Models/ResourceSkuLocationInfo.cs | 41 + ...esourceSkuRestrictionInfo.Serialization.cs | 56 + .../Models/ResourceSkuRestrictionInfo.cs | 37 + .../ResourceSkuRestrictions.Serialization.cs | 73 + .../Models/ResourceSkuRestrictions.cs | 50 + .../ResourceSkuRestrictionsReasonCode.cs | 51 + .../Models/ResourceSkuRestrictionsType.cs | 51 + .../ResourceSkuZoneDetails.Serialization.cs | 56 + .../Models/ResourceSkuZoneDetails.cs | 49 + .../ResourceUploadDefinition.Serialization.cs | 41 + .../Models/ResourceUploadDefinition.cs | 34 + .../ServiceRegistryInstance.Serialization.cs | 35 + .../Models/ServiceRegistryInstance.cs | 32 + ...ServiceRegistryProperties.Serialization.cs | 68 + .../Models/ServiceRegistryProperties.cs | 40 + .../ServiceRegistryProvisioningState.cs | 60 + ...egistryResourceCollection.Serialization.cs | 47 + .../ServiceRegistryResourceCollection.cs | 43 + ...rviceRegistryResourceData.Serialization.cs | 71 + ...eRegistryResourceRequests.Serialization.cs | 46 + .../Models/ServiceRegistryResourceRequests.cs | 36 + .../ServiceResourceData.Serialization.cs | 115 + .../ServiceResourceList.Serialization.cs | 47 + .../Generated/Models/ServiceResourceList.cs | 43 + .../Models/SkuCapacity.Serialization.cs | 62 + .../src/Generated/Models/SkuCapacity.cs | 42 + .../src/Generated/Models/SkuScaleType.cs | 54 + ...rceUploadedUserSourceInfo.Serialization.cs | 81 + .../Models/SourceUploadedUserSourceInfo.cs | 43 + .../Models/SsoProperties.Serialization.cs | 95 + .../src/Generated/Models/SsoProperties.cs | 45 + .../Models/StackProperties.Serialization.cs | 51 + .../src/Generated/Models/StackProperties.cs | 32 + .../Models/StorageAccount.Serialization.cs | 53 + .../src/Generated/Models/StorageAccount.cs | 51 + .../Models/StorageProperties.Serialization.cs | 44 + .../src/Generated/Models/StorageProperties.cs | 28 + ...StorageResourceCollection.Serialization.cs | 47 + .../Models/StorageResourceCollection.cs | 37 + .../StorageResourceData.Serialization.cs | 71 + .../src/Generated/Models/StorageType.cs | 48 + ...rtedBuildpackResourceData.Serialization.cs | 71 + ...ildpackResourceProperties.Serialization.cs | 40 + .../SupportedBuildpackResourceProperties.cs | 28 + ...ortedBuildpacksCollection.Serialization.cs | 47 + .../Models/SupportedBuildpacksCollection.cs | 43 + .../Models/SupportedRuntimePlatform.cs | 51 + .../Generated/Models/SupportedRuntimeValue.cs | 57 + .../SupportedRuntimeVersion.Serialization.cs | 51 + .../Models/SupportedRuntimeVersion.cs | 36 + ...upportedStackResourceData.Serialization.cs | 71 + ...edStackResourceProperties.Serialization.cs | 51 + .../SupportedStackResourceProperties.cs | 32 + ...SupportedStacksCollection.Serialization.cs | 47 + .../Models/SupportedStacksCollection.cs | 43 + .../Models/TemporaryDisk.Serialization.cs | 56 + .../src/Generated/Models/TemporaryDisk.cs | 32 + .../src/Generated/Models/TestKeyType.cs | 51 + .../Models/TestKeys.Serialization.cs | 58 + .../src/Generated/Models/TestKeys.cs | 44 + .../src/Generated/Models/TrafficDirection.cs | 51 + .../Models/UnderlyingResourceType.cs | 48 + .../UploadedUserSourceInfo.Serialization.cs | 68 + .../Models/UploadedUserSourceInfo.cs | 32 + .../Models/UserSourceInfo.Serialization.cs | 60 + .../src/Generated/Models/UserSourceInfo.cs | 32 + .../ValidationMessages.Serialization.cs | 46 + .../Generated/Models/ValidationMessages.cs | 36 + .../Generated/MonitoringSettingResource.cs | 257 ++ .../MonitoringSettingResourceData.cs | 36 + .../src/Generated/ProviderConstants.cs | 16 + .../ApiPortalCustomDomainsRestOperations.cs | 473 ++++ .../ApiPortalsRestOperations.cs | 538 +++++ .../RestOperations/AppsRestOperations.cs | 800 +++++++ .../RestOperations/BindingsRestOperations.cs | 565 +++++ .../BuildServiceAgentPoolRestOperations.cs | 389 +++ .../BuildServiceBuilderRestOperations.cs | 473 ++++ .../BuildServiceRestOperations.cs | 1457 +++++++++++ .../BuildpackBindingRestOperations.cs | 501 ++++ .../CertificatesRestOperations.cs | 447 ++++ .../ConfigServersRestOperations.cs | 360 +++ .../ConfigurationServicesRestOperations.cs | 530 ++++ .../CustomDomainsRestOperations.cs | 565 +++++ .../DeploymentsRestOperations.cs | 1360 +++++++++++ .../GatewayCustomDomainsRestOperations.cs | 473 ++++ .../GatewayRouteConfigsRestOperations.cs | 473 ++++ .../RestOperations/GatewaysRestOperations.cs | 538 +++++ .../MonitoringSettingsRestOperations.cs | 280 +++ .../RuntimeVersionsRestOperations.cs | 95 + .../ServiceRegistriesRestOperations.cs | 437 ++++ .../RestOperations/ServicesRestOperations.cs | 1163 +++++++++ .../RestOperations/SkusRestOperations.cs | 175 ++ .../RestOperations/StoragesRestOperations.cs | 447 ++++ .../src/Generated/ServiceRegistryResource.cs | 241 ++ .../ServiceRegistryResourceCollection.cs | 329 +++ .../Generated/ServiceRegistryResourceData.cs | 36 + .../src/Generated/ServiceResource.cs | 1189 +++++++++ .../Generated/ServiceResourceCollection.cs | 334 +++ .../src/Generated/ServiceResourceData.cs | 44 + .../src/Generated/StorageResource.cs | 249 ++ .../Generated/StorageResourceCollection.cs | 333 +++ .../src/Generated/StorageResourceData.cs | 36 + .../Generated/SupportedBuildpackResource.cs | 137 ++ .../SupportedBuildpackResourceCollection.cs | 237 ++ .../SupportedBuildpackResourceData.cs | 47 + .../src/Generated/SupportedStackResource.cs | 137 ++ .../SupportedStackResourceCollection.cs | 237 ++ .../Generated/SupportedStackResourceData.cs | 36 + .../src/Properties/AssemblyInfo.cs | 9 + .../src/autorest.md | 57 + .../tests/AppPlatformManagementTestBase.cs | 41 + .../AppPlatformManagementTestEnvironment.cs | 11 + ...e.ResourceManager.AppPlatform.Tests.csproj | 5 + sdk/appplatform/ci.yml | 32 + 435 files changed, 49694 insertions(+) create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/Azure.ResourceManager.AppPlatform.sln create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/CHANGELOG.md create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/Directory.Build.props create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/README.md create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/api/Azure.ResourceManager.AppPlatform.netstandard2.0.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Azure.ResourceManager.AppPlatform.csproj create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalCustomDomainResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalCustomDomainResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalCustomDomainResourceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalResourceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppResourceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BindingResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BindingResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BindingResourceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildResultCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildResultData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildResultResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceAgentPoolResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceAgentPoolResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceAgentPoolResourceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuilderResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuilderResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuilderResourceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildpackBindingResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildpackBindingResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildpackBindingResourceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CertificateResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CertificateResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CertificateResourceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigServerResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigServerResourceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigurationServiceResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigurationServiceResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigurationServiceResourceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomDomainResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomDomainResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomDomainResourceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DeploymentResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DeploymentResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DeploymentResourceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/AppPlatformExtensions.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/TenantResourceExtensionClient.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayCustomDomainResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayCustomDomainResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayCustomDomainResourceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayResourceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayRouteConfigResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayRouteConfigResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayRouteConfigResourceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ApiPortalCustomDomainResourceOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ApiPortalResourceOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppPlatformArmOperation.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppPlatformArmOperationOfT.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppResourceOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/BindingResourceOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/BuildServiceAgentPoolResourceOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/BuilderResourceOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/BuildpackBindingResourceOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/CertificateResourceOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ConfigServerResourceOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ConfigServerSettingsValidateResultOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ConfigurationServiceResourceOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ConfigurationServiceSettingsValidateResultOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/CustomDomainResourceOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/DeploymentResourceOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/GatewayCustomDomainResourceOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/GatewayResourceOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/GatewayRouteConfigResourceOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/MonitoringSettingResourceOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ServiceRegistryResourceOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ServiceResourceOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/StorageResourceOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ActiveDeploymentCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ActiveDeploymentCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainResourceCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainResourceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalInstance.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalInstance.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalProvisioningState.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceRequests.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceRequests.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformSku.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformSku.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProvisioningState.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationInsightsAgentVersions.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationInsightsAgentVersions.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AvailableRuntimeVersions.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AvailableRuntimeVersions.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AzureFileVolume.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AzureFileVolume.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingType.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildProvisioningState.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultLog.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultLog.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultProvisioningState.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultUserSourceInfo.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultUserSourceInfo.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolSizeProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolSizeProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServicePropertiesResourceRequests.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServicePropertiesResourceRequests.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceProvisioningState.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildStageProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildStageProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderProvisioningState.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderResourceCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderResourceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingLaunchProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingLaunchProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingProvisioningState.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingResourceCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingResourceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpacksGroupProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpacksGroupProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateResourceCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateResourceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ClusterResourceProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ClusterResourceProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerGitProperty.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerGitProperty.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerResourceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerSettings.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerSettings.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerSettingsErrorRecord.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerSettingsErrorRecord.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerSettingsValidateResult.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerSettingsValidateResult.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerState.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceGitProperty.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceGitProperty.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceGitPropertyValidateResult.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceGitPropertyValidateResult.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceGitRepository.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceGitRepository.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceInstance.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceInstance.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceProvisioningState.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceRequests.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceRequests.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceSettings.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceSettings.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceSettingsValidateResult.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceSettingsValidateResult.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerProbeSettings.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerProbeSettings.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContentCertificateProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContentCertificateProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomContainer.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomContainer.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomContainerUserSourceInfo.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomContainerUserSourceInfo.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainValidatePayload.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainValidatePayload.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainValidateResult.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainValidateResult.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskResource.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentInstance.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentInstance.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceProvisioningState.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceStatus.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentSettings.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentSettings.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DiagnosticParameters.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DiagnosticParameters.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Error.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Error.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayApiMetadataProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayApiMetadataProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayApiRoute.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayApiRoute.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCorsProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCorsProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainResourceCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainResourceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayInstance.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayInstance.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayOperatorProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayOperatorProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayOperatorResourceRequests.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayOperatorResourceRequests.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayProvisioningState.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceRequests.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceRequests.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigResourceCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigResourceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GitPatternRepository.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GitPatternRepository.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ImageRegistryCredential.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ImageRegistryCredential.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/JarUploadedUserSourceInfo.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/JarUploadedUserSourceInfo.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/KPackBuildStageProvisioningState.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/KeyVaultCertificateProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/KeyVaultCertificateProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LoadedCertificate.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LoadedCertificate.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUrlResponse.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUrlResponse.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MonitoringSettingProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MonitoringSettingProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MonitoringSettingResourceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MonitoringSettingState.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailability.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailability.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailabilityContent.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailabilityContent.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NetCoreZipUploadedUserSourceInfo.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NetCoreZipUploadedUserSourceInfo.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NetworkProfile.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NetworkProfile.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NetworkProfileOutboundIPs.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NetworkProfileOutboundIPs.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PersistentDisk.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PersistentDisk.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PowerState.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ProvisioningState.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/RegenerateTestKeyRequestPayload.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/RegenerateTestKeyRequestPayload.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/RequiredTraffic.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/RequiredTraffic.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceRequests.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceRequests.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSku.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSku.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuCapabilities.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuCapabilities.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuLocationInfo.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuLocationInfo.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictionInfo.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictionInfo.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictions.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictions.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictionsReasonCode.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictionsType.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuZoneDetails.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuZoneDetails.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceUploadDefinition.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceUploadDefinition.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryInstance.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryInstance.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryProvisioningState.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceRequests.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceRequests.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceResourceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceResourceList.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceResourceList.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SkuCapacity.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SkuCapacity.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SkuScaleType.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SourceUploadedUserSourceInfo.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SourceUploadedUserSourceInfo.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SsoProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SsoProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StackProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StackProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageAccount.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageAccount.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageResourceCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageResourceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageType.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpackResourceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpackResourceProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpackResourceProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpacksCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpacksCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedRuntimePlatform.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedRuntimeValue.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedRuntimeVersion.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedRuntimeVersion.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStackResourceData.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStackResourceProperties.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStackResourceProperties.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStacksCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStacksCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TemporaryDisk.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TemporaryDisk.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TestKeyType.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TestKeys.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TestKeys.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TrafficDirection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UnderlyingResourceType.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UploadedUserSourceInfo.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UploadedUserSourceInfo.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UserSourceInfo.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UserSourceInfo.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ValidationMessages.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ValidationMessages.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/MonitoringSettingResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/MonitoringSettingResourceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ProviderConstants.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApiPortalCustomDomainsRestOperations.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApiPortalsRestOperations.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/AppsRestOperations.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BindingsRestOperations.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceAgentPoolRestOperations.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceBuilderRestOperations.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceRestOperations.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildpackBindingRestOperations.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/CertificatesRestOperations.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ConfigServersRestOperations.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ConfigurationServicesRestOperations.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/CustomDomainsRestOperations.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/DeploymentsRestOperations.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/GatewayCustomDomainsRestOperations.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/GatewayRouteConfigsRestOperations.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/GatewaysRestOperations.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/MonitoringSettingsRestOperations.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/RuntimeVersionsRestOperations.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ServiceRegistriesRestOperations.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ServicesRestOperations.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/SkusRestOperations.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/StoragesRestOperations.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceRegistryResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceRegistryResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceRegistryResourceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceResourceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/StorageResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/StorageResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/StorageResourceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedBuildpackResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedBuildpackResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedBuildpackResourceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedStackResource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedStackResourceCollection.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedStackResourceData.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Properties/AssemblyInfo.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/tests/AppPlatformManagementTestBase.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/tests/AppPlatformManagementTestEnvironment.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/tests/Azure.ResourceManager.AppPlatform.Tests.csproj create mode 100644 sdk/appplatform/ci.yml diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/Azure.ResourceManager.AppPlatform.sln b/sdk/appplatform/Azure.ResourceManager.AppPlatform/Azure.ResourceManager.AppPlatform.sln new file mode 100644 index 0000000000000..a8a60932abf7a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/Azure.ResourceManager.AppPlatform.sln @@ -0,0 +1,51 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30309.148 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F271E003-A81A-48A2-96B9-CAE7BBF5A754}") = "Azure.ResourceManager.AppPlatform", "src\Azure.ResourceManager.AppPlatform.csproj", "{D7B363AB-EBBC-408E-BA52-C119BA655BBA}" +EndProject +Project("{F271E003-A81A-48A2-96B9-CAE7BBF5A754}") = "Azure.ResourceManager.AppPlatform.Tests", "tests\Azure.ResourceManager.AppPlatform.Tests.csproj", "{37213941-3324-4223-AE2E-05734ABCA205}" +EndProject +Global + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8089EA1C-C2F1-40FE-BCBD-9CB5A474F3E6} + EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D7B363AB-EBBC-408E-BA52-C119BA655BBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D7B363AB-EBBC-408E-BA52-C119BA655BBA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D7B363AB-EBBC-408E-BA52-C119BA655BBA}.Debug|x64.ActiveCfg = Debug|Any CPU + {D7B363AB-EBBC-408E-BA52-C119BA655BBA}.Debug|x64.Build.0 = Debug|Any CPU + {D7B363AB-EBBC-408E-BA52-C119BA655BBA}.Debug|x86.ActiveCfg = Debug|Any CPU + {D7B363AB-EBBC-408E-BA52-C119BA655BBA}.Debug|x86.Build.0 = Debug|Any CPU + {D7B363AB-EBBC-408E-BA52-C119BA655BBA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D7B363AB-EBBC-408E-BA52-C119BA655BBA}.Release|Any CPU.Build.0 = Release|Any CPU + {D7B363AB-EBBC-408E-BA52-C119BA655BBA}.Release|x64.ActiveCfg = Release|Any CPU + {D7B363AB-EBBC-408E-BA52-C119BA655BBA}.Release|x64.Build.0 = Release|Any CPU + {D7B363AB-EBBC-408E-BA52-C119BA655BBA}.Release|x86.ActiveCfg = Release|Any CPU + {D7B363AB-EBBC-408E-BA52-C119BA655BBA}.Release|x86.Build.0 = Release|Any CPU + {37213941-3324-4223-AE2E-05734ABCA205}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {37213941-3324-4223-AE2E-05734ABCA205}.Debug|Any CPU.Build.0 = Debug|Any CPU + {37213941-3324-4223-AE2E-05734ABCA205}.Debug|x64.ActiveCfg = Debug|Any CPU + {37213941-3324-4223-AE2E-05734ABCA205}.Debug|x64.Build.0 = Debug|Any CPU + {37213941-3324-4223-AE2E-05734ABCA205}.Debug|x86.ActiveCfg = Debug|Any CPU + {37213941-3324-4223-AE2E-05734ABCA205}.Debug|x86.Build.0 = Debug|Any CPU + {37213941-3324-4223-AE2E-05734ABCA205}.Release|Any CPU.ActiveCfg = Release|Any CPU + {37213941-3324-4223-AE2E-05734ABCA205}.Release|Any CPU.Build.0 = Release|Any CPU + {37213941-3324-4223-AE2E-05734ABCA205}.Release|x64.ActiveCfg = Release|Any CPU + {37213941-3324-4223-AE2E-05734ABCA205}.Release|x64.Build.0 = Release|Any CPU + {37213941-3324-4223-AE2E-05734ABCA205}.Release|x86.ActiveCfg = Release|Any CPU + {37213941-3324-4223-AE2E-05734ABCA205}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/CHANGELOG.md b/sdk/appplatform/Azure.ResourceManager.AppPlatform/CHANGELOG.md new file mode 100644 index 0000000000000..349f18ed58f2b --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/CHANGELOG.md @@ -0,0 +1,15 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### General New Features + + - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET + - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing + - HTTP pipeline with custom policies + - Better error-handling + - Support uniform telemetry across all languages + +This package follows the [Azure SDK Design Guidelines for .NET](https://azure.github.io/azure-sdk/dotnet_introduction.html) which provide a number of core capabilities that are shared amongst all Azure SDKs, including the intuitive Azure Identity library, an HTTP Pipeline with custom policies, error-handling, distributed tracing, and much more. + +This is a Public Preview version, so expect incompatible changes in subsequent releases as we improve the product. To provide feedback, please submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues). \ No newline at end of file diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/Directory.Build.props b/sdk/appplatform/Azure.ResourceManager.AppPlatform/Directory.Build.props new file mode 100644 index 0000000000000..1a9611bd49242 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/README.md b/sdk/appplatform/Azure.ResourceManager.AppPlatform/README.md new file mode 100644 index 0000000000000..cfb23c1b24075 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/README.md @@ -0,0 +1,76 @@ +# Azure AppPlatform Management client library for .NET + +This package follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html) which provide a number of core capabilities that are shared amongst all Azure SDKs, including the intuitive Azure Identity library, an HTTP Pipeline with custom policies, error-handling, distributed tracing, and much more. + +## Getting started + +### Install the package + +Install the Azure AppPlatform management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.AppPlatform --prerelease +``` + +### Prerequisites + +* You must have an [Azure subscription](https://azure.microsoft.com/free/dotnet/) + +### Authenticate the Client + +To create an authenticated client and start interacting with Azure resources, please see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/mgmt_preview_quickstart.md) + +## Key concepts + +Key concepts of the Azure .NET SDK can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html) + +## Documentation + +Documentation is available to help you learn how to use this package + +- [Quickstart](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/mgmt_preview_quickstart.md) +- [API References](https://docs.microsoft.com/dotnet/api/?view=azure-dotnet) +- [Authentication](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md) + +## Examples + +Code samples for using the management library for .NET can be found in the following locations +- [.NET Management Library Code Samples](https://docs.microsoft.com/samples/browse/?branch=master&languages=csharp&term=managing%20using%20Azure%20.NET%20SDK) + +## Troubleshooting + +- File an issue via [Github + Issues](https://github.com/Azure/azure-sdk-for-net/issues) +- Check [previous + questions](https://stackoverflow.com/questions/tagged/azure+.net) + or ask new ones on Stack Overflow using azure and .net tags. + + +## Next steps + +For more information on Azure SDK, please refer to [this website](https://azure.github.io/azure-sdk/) + +## Contributing + +For details on contributing to this repository, see the [contributing +guide][cg]. + +This project welcomes contributions and suggestions. Most contributions +require you to agree to a Contributor License Agreement (CLA) declaring +that you have the right to, and actually do, grant us the rights to use +your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine +whether you need to provide a CLA and decorate the PR appropriately +(e.g., label, comment). Simply follow the instructions provided by the +bot. You will only need to do this once across all repositories using +our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For +more information see the [Code of Conduct FAQ][coc_faq] or contact + with any additional questions or comments. + + +[cg]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/resourcemanager/Azure.ResourceManager/docs/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ \ No newline at end of file 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 new file mode 100644 index 0000000000000..5047d6a162212 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/api/Azure.ResourceManager.AppPlatform.netstandard2.0.cs @@ -0,0 +1,2133 @@ +namespace Azure.ResourceManager.AppPlatform +{ + public partial class ApiPortalCustomDomainResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ApiPortalCustomDomainResource() { } + public virtual Azure.ResourceManager.AppPlatform.ApiPortalCustomDomainResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string apiPortalName, string domainName) { 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.ApiPortalCustomDomainResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.ApiPortalCustomDomainResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ApiPortalCustomDomainResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ApiPortalCustomDomainResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string domainName, Azure.ResourceManager.AppPlatform.ApiPortalCustomDomainResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string domainName, Azure.ResourceManager.AppPlatform.ApiPortalCustomDomainResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string domainName, 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 domainName, 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 ApiPortalCustomDomainResourceData : Azure.ResourceManager.Models.ResourceData + { + public ApiPortalCustomDomainResourceData() { } + public string ApiPortalCustomDomainThumbprint { get { throw null; } set { } } + } + public partial class ApiPortalResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ApiPortalResource() { } + public virtual Azure.ResourceManager.AppPlatform.ApiPortalResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string apiPortalName) { 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 GetApiPortalCustomDomainResource(string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetApiPortalCustomDomainResourceAsync(string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.ApiPortalCustomDomainResourceCollection GetApiPortalCustomDomainResources() { 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.ApiPortalResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.ApiPortalResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ValidateDomain(Azure.ResourceManager.AppPlatform.Models.CustomDomainValidatePayload validatePayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ValidateDomainAsync(Azure.ResourceManager.AppPlatform.Models.CustomDomainValidatePayload validatePayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ApiPortalResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ApiPortalResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string apiPortalName, Azure.ResourceManager.AppPlatform.ApiPortalResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string apiPortalName, Azure.ResourceManager.AppPlatform.ApiPortalResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string apiPortalName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string apiPortalName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string apiPortalName, 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 apiPortalName, 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 ApiPortalResourceData : Azure.ResourceManager.Models.ResourceData + { + public ApiPortalResourceData() { } + public Azure.ResourceManager.AppPlatform.Models.ApiPortalProperties Properties { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.AppPlatformSku Sku { get { throw null; } set { } } + } + public static partial class AppPlatformExtensions + { + public static Azure.Response CheckNameAvailabilityService(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, Azure.ResourceManager.AppPlatform.Models.NameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> CheckNameAvailabilityServiceAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, Azure.ResourceManager.AppPlatform.Models.NameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.AppPlatform.ApiPortalCustomDomainResource GetApiPortalCustomDomainResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.ApiPortalResource GetApiPortalResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.AppResource GetAppResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.BindingResource GetBindingResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.BuilderResource GetBuilderResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.BuildpackBindingResource GetBuildpackBindingResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.BuildResource GetBuildResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.BuildResultResource GetBuildResultResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.BuildServiceAgentPoolResource GetBuildServiceAgentPoolResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.BuildServiceResource GetBuildServiceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.CertificateResource GetCertificateResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.ConfigServerResource GetConfigServerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.ConfigurationServiceResource GetConfigurationServiceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.CustomDomainResource GetCustomDomainResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.DeploymentResource GetDeploymentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.GatewayCustomDomainResource GetGatewayCustomDomainResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.GatewayResource GetGatewayResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.GatewayRouteConfigResource GetGatewayRouteConfigResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.MonitoringSettingResource GetMonitoringSettingResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Pageable GetRuntimeVersionsRuntimeVersions(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetRuntimeVersionsRuntimeVersionsAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.AppPlatform.ServiceRegistryResource GetServiceRegistryResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.ServiceResource GetServiceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetServiceResource(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetServiceResourceAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.AppPlatform.ServiceResourceCollection GetServiceResources(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetServiceResources(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetServiceResourcesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, 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; } + public static Azure.AsyncPageable GetSkusAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.AppPlatform.StorageResource GetStorageResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.SupportedBuildpackResource GetSupportedBuildpackResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.SupportedStackResource GetSupportedStackResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class AppResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AppResource() { } + public virtual Azure.ResourceManager.AppPlatform.AppResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string appName) { 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(string syncStatus = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string syncStatus = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetBindingResource(string bindingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBindingResourceAsync(string bindingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.BindingResourceCollection GetBindingResources() { throw null; } + public virtual Azure.Response GetCustomDomainResource(string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetCustomDomainResourceAsync(string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.CustomDomainResourceCollection GetCustomDomainResources() { throw null; } + public virtual Azure.Response GetDeploymentResource(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentResourceAsync(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.DeploymentResourceCollection GetDeploymentResources() { throw null; } + public virtual Azure.Response GetResourceUploadUrl(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetResourceUploadUrlAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation SetActiveDeployments(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.ActiveDeploymentCollection activeDeploymentCollection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetActiveDeploymentsAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.ActiveDeploymentCollection activeDeploymentCollection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.AppResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.AppResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ValidateDomain(Azure.ResourceManager.AppPlatform.Models.CustomDomainValidatePayload validatePayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ValidateDomainAsync(Azure.ResourceManager.AppPlatform.Models.CustomDomainValidatePayload validatePayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class AppResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AppResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string appName, Azure.ResourceManager.AppPlatform.AppResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string appName, Azure.ResourceManager.AppPlatform.AppResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string appName, string syncStatus = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string appName, string syncStatus = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string appName, string syncStatus = null, 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 appName, string syncStatus = null, 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 AppResourceData : Azure.ResourceManager.Models.ResourceData + { + public AppResourceData() { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.AppResourceProperties Properties { get { throw null; } set { } } + } + public partial class BindingResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected BindingResource() { } + public virtual Azure.ResourceManager.AppPlatform.BindingResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string appName, string bindingName) { 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.BindingResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.BindingResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class BindingResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected BindingResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string bindingName, Azure.ResourceManager.AppPlatform.BindingResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string bindingName, Azure.ResourceManager.AppPlatform.BindingResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string bindingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string bindingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string bindingName, 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 bindingName, 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 BindingResourceData : Azure.ResourceManager.Models.ResourceData + { + public BindingResourceData() { } + public Azure.ResourceManager.AppPlatform.Models.BindingResourceProperties Properties { get { throw null; } set { } } + } + public partial class BuildCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected BuildCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string buildName, Azure.ResourceManager.AppPlatform.BuildData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string buildName, Azure.ResourceManager.AppPlatform.BuildData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string buildName, 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 buildName, 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 BuildData : Azure.ResourceManager.Models.ResourceData + { + public BuildData() { } + public Azure.ResourceManager.AppPlatform.Models.BuildProperties Properties { get { throw null; } set { } } + } + public partial class BuilderResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected BuilderResource() { } + public virtual Azure.ResourceManager.AppPlatform.BuilderResourceData 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 builderName) { 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 GetBuildpackBindingResource(string buildpackBindingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBuildpackBindingResourceAsync(string buildpackBindingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.BuildpackBindingResourceCollection GetBuildpackBindingResources() { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.BuilderResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.BuilderResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class BuilderResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected BuilderResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string builderName, Azure.ResourceManager.AppPlatform.BuilderResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string builderName, Azure.ResourceManager.AppPlatform.BuilderResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string builderName, 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 builderName, 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 BuilderResourceData : Azure.ResourceManager.Models.ResourceData + { + public BuilderResourceData() { } + public Azure.ResourceManager.AppPlatform.Models.BuilderProperties Properties { get { throw null; } set { } } + } + public partial class BuildpackBindingResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected BuildpackBindingResource() { } + public virtual Azure.ResourceManager.AppPlatform.BuildpackBindingResourceData 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 builderName, string buildpackBindingName) { 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.BuildpackBindingResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.BuildpackBindingResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class BuildpackBindingResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected BuildpackBindingResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string buildpackBindingName, Azure.ResourceManager.AppPlatform.BuildpackBindingResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string buildpackBindingName, Azure.ResourceManager.AppPlatform.BuildpackBindingResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string buildpackBindingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string buildpackBindingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string buildpackBindingName, 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 buildpackBindingName, 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 BuildpackBindingResourceData : Azure.ResourceManager.Models.ResourceData + { + public BuildpackBindingResourceData() { } + public Azure.ResourceManager.AppPlatform.Models.BuildpackBindingProperties Properties { get { throw null; } set { } } + } + public partial class BuildResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected BuildResource() { } + public virtual Azure.ResourceManager.AppPlatform.BuildData 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.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 GetBuildResult(string buildResultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBuildResultAsync(string buildResultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.BuildResultCollection GetBuildResults() { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.BuildData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.BuildData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class BuildResultCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected BuildResultCollection() { } + public virtual Azure.Response Exists(string buildResultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string buildResultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string buildResultName, 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 buildResultName, 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 BuildResultData : Azure.ResourceManager.Models.ResourceData + { + public BuildResultData() { } + public Azure.ResourceManager.AppPlatform.Models.BuildResultProperties Properties { get { throw null; } set { } } + } + public partial class BuildResultResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected BuildResultResource() { } + public virtual Azure.ResourceManager.AppPlatform.BuildResultData 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, string buildResultName) { 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 GetBuildResultLog(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBuildResultLogAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class BuildServiceAgentPoolResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected BuildServiceAgentPoolResource() { } + public virtual Azure.ResourceManager.AppPlatform.BuildServiceAgentPoolResourceData 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 agentPoolName) { 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.BuildServiceAgentPoolResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.BuildServiceAgentPoolResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class BuildServiceAgentPoolResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected BuildServiceAgentPoolResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string agentPoolName, Azure.ResourceManager.AppPlatform.BuildServiceAgentPoolResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string agentPoolName, Azure.ResourceManager.AppPlatform.BuildServiceAgentPoolResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string agentPoolName, 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 agentPoolName, 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 BuildServiceAgentPoolResourceData : Azure.ResourceManager.Models.ResourceData + { + public BuildServiceAgentPoolResourceData() { } + public Azure.ResourceManager.AppPlatform.Models.BuildServiceAgentPoolProperties Properties { get { throw null; } set { } } + } + public partial class BuildServiceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected BuildServiceCollection() { } + 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; } + 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 buildServiceName, 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 BuildServiceData : Azure.ResourceManager.Models.ResourceData + { + public BuildServiceData() { } + public Azure.ResourceManager.AppPlatform.Models.BuildServiceProperties Properties { get { throw null; } set { } } + } + public partial class BuildServiceResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected BuildServiceResource() { } + public virtual Azure.ResourceManager.AppPlatform.BuildServiceData 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) { 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 GetBuild(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBuildAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetBuilderResource(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBuilderResourceAsync(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.BuilderResourceCollection GetBuilderResources() { throw null; } + public virtual Azure.ResourceManager.AppPlatform.BuildCollection GetBuilds() { throw null; } + public virtual Azure.Response GetBuildServiceAgentPoolResource(string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBuildServiceAgentPoolResourceAsync(string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.BuildServiceAgentPoolResourceCollection GetBuildServiceAgentPoolResources() { throw null; } + public virtual Azure.Response GetResourceUploadUrl(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetResourceUploadUrlAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSupportedBuildpackResource(string buildpackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSupportedBuildpackResourceAsync(string buildpackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.SupportedBuildpackResourceCollection GetSupportedBuildpackResources() { throw null; } + public virtual Azure.Response GetSupportedStackResource(string stackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSupportedStackResourceAsync(string stackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.SupportedStackResourceCollection GetSupportedStackResources() { throw null; } + } + public partial class CertificateResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected CertificateResource() { } + public virtual Azure.ResourceManager.AppPlatform.CertificateResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string certificateName) { 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.CertificateResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.CertificateResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class CertificateResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected CertificateResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string certificateName, Azure.ResourceManager.AppPlatform.CertificateResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string certificateName, Azure.ResourceManager.AppPlatform.CertificateResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string certificateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string certificateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string certificateName, 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 certificateName, 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 CertificateResourceData : Azure.ResourceManager.Models.ResourceData + { + public CertificateResourceData() { } + public Azure.ResourceManager.AppPlatform.Models.CertificateProperties Properties { get { throw null; } set { } } + } + public partial class ConfigServerResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ConfigServerResource() { } + public virtual Azure.ResourceManager.AppPlatform.ConfigServerResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.ConfigServerResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.ConfigServerResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName) { 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.ConfigServerResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.ConfigServerResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ConfigServerResourceData : Azure.ResourceManager.Models.ResourceData + { + public ConfigServerResourceData() { } + public Azure.ResourceManager.AppPlatform.Models.ConfigServerProperties Properties { get { throw null; } set { } } + } + public partial class ConfigurationServiceResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ConfigurationServiceResource() { } + public virtual Azure.ResourceManager.AppPlatform.ConfigurationServiceResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string configurationServiceName) { 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.ConfigurationServiceResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.ConfigurationServiceResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Validate(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.ConfigurationServiceSettings settings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ValidateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.ConfigurationServiceSettings settings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ConfigurationServiceResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ConfigurationServiceResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string configurationServiceName, Azure.ResourceManager.AppPlatform.ConfigurationServiceResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string configurationServiceName, Azure.ResourceManager.AppPlatform.ConfigurationServiceResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string configurationServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string configurationServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string configurationServiceName, 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 configurationServiceName, 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 ConfigurationServiceResourceData : Azure.ResourceManager.Models.ResourceData + { + public ConfigurationServiceResourceData() { } + public Azure.ResourceManager.AppPlatform.Models.ConfigurationServiceProperties Properties { get { throw null; } set { } } + } + public partial class CustomDomainResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected CustomDomainResource() { } + public virtual Azure.ResourceManager.AppPlatform.CustomDomainResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string appName, string domainName) { 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.CustomDomainResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.CustomDomainResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class CustomDomainResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected CustomDomainResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string domainName, Azure.ResourceManager.AppPlatform.CustomDomainResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string domainName, Azure.ResourceManager.AppPlatform.CustomDomainResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string domainName, 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 domainName, 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 CustomDomainResourceData : Azure.ResourceManager.Models.ResourceData + { + public CustomDomainResourceData() { } + public Azure.ResourceManager.AppPlatform.Models.CustomDomainProperties Properties { get { throw null; } set { } } + } + public partial class DeploymentResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DeploymentResource() { } + public virtual Azure.ResourceManager.AppPlatform.DeploymentResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName) { 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.ResourceManager.ArmOperation GenerateHeapDump(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GenerateHeapDumpAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation GenerateThreadDump(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GenerateThreadDumpAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, 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 GetLogFileUrl(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetLogFileUrlAsync(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 Start(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation StartJFR(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartJFRAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Stop(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StopAsync(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.DeploymentResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.DeploymentResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DeploymentResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DeploymentResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string deploymentName, Azure.ResourceManager.AppPlatform.DeploymentResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string deploymentName, Azure.ResourceManager.AppPlatform.DeploymentResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Collections.Generic.IEnumerable version = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Collections.Generic.IEnumerable version = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string deploymentName, 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 DeploymentResourceData : Azure.ResourceManager.Models.ResourceData + { + public DeploymentResourceData() { } + public Azure.ResourceManager.AppPlatform.Models.DeploymentResourceProperties Properties { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.AppPlatformSku Sku { get { throw null; } set { } } + } + public partial class GatewayCustomDomainResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected GatewayCustomDomainResource() { } + public virtual Azure.ResourceManager.AppPlatform.GatewayCustomDomainResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, string domainName) { 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.GatewayCustomDomainResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.GatewayCustomDomainResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class GatewayCustomDomainResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected GatewayCustomDomainResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string domainName, Azure.ResourceManager.AppPlatform.GatewayCustomDomainResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string domainName, Azure.ResourceManager.AppPlatform.GatewayCustomDomainResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string domainName, 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 domainName, 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 GatewayCustomDomainResourceData : Azure.ResourceManager.Models.ResourceData + { + public GatewayCustomDomainResourceData() { } + public string GatewayCustomDomainThumbprint { get { throw null; } set { } } + } + public partial class GatewayResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected GatewayResource() { } + public virtual Azure.ResourceManager.AppPlatform.GatewayResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName) { 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 GetGatewayCustomDomainResource(string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetGatewayCustomDomainResourceAsync(string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.GatewayCustomDomainResourceCollection GetGatewayCustomDomainResources() { throw null; } + public virtual Azure.Response GetGatewayRouteConfigResource(string routeConfigName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetGatewayRouteConfigResourceAsync(string routeConfigName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.GatewayRouteConfigResourceCollection GetGatewayRouteConfigResources() { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.GatewayResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.GatewayResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ValidateDomain(Azure.ResourceManager.AppPlatform.Models.CustomDomainValidatePayload validatePayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ValidateDomainAsync(Azure.ResourceManager.AppPlatform.Models.CustomDomainValidatePayload validatePayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class GatewayResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected GatewayResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string gatewayName, Azure.ResourceManager.AppPlatform.GatewayResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string gatewayName, Azure.ResourceManager.AppPlatform.GatewayResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string gatewayName, 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 gatewayName, 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 GatewayResourceData : Azure.ResourceManager.Models.ResourceData + { + public GatewayResourceData() { } + public Azure.ResourceManager.AppPlatform.Models.GatewayProperties Properties { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.AppPlatformSku Sku { get { throw null; } set { } } + } + public partial class GatewayRouteConfigResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected GatewayRouteConfigResource() { } + public virtual Azure.ResourceManager.AppPlatform.GatewayRouteConfigResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, string routeConfigName) { 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.GatewayRouteConfigResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.GatewayRouteConfigResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class GatewayRouteConfigResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected GatewayRouteConfigResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string routeConfigName, Azure.ResourceManager.AppPlatform.GatewayRouteConfigResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string routeConfigName, Azure.ResourceManager.AppPlatform.GatewayRouteConfigResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string routeConfigName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string routeConfigName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string routeConfigName, 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 routeConfigName, 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 GatewayRouteConfigResourceData : Azure.ResourceManager.Models.ResourceData + { + public GatewayRouteConfigResourceData() { } + public Azure.ResourceManager.AppPlatform.Models.GatewayRouteConfigProperties Properties { get { throw null; } set { } } + } + public partial class MonitoringSettingResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MonitoringSettingResource() { } + public virtual Azure.ResourceManager.AppPlatform.MonitoringSettingResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.MonitoringSettingResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.MonitoringSettingResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName) { 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.MonitoringSettingResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.MonitoringSettingResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MonitoringSettingResourceData : Azure.ResourceManager.Models.ResourceData + { + public MonitoringSettingResourceData() { } + public Azure.ResourceManager.AppPlatform.Models.MonitoringSettingProperties Properties { get { throw null; } set { } } + } + public partial class ServiceRegistryResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ServiceRegistryResource() { } + public virtual Azure.ResourceManager.AppPlatform.ServiceRegistryResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string serviceRegistryName) { 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, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ServiceRegistryResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ServiceRegistryResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string serviceRegistryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string serviceRegistryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string serviceRegistryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string serviceRegistryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string serviceRegistryName, 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 serviceRegistryName, 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 ServiceRegistryResourceData : Azure.ResourceManager.Models.ResourceData + { + public ServiceRegistryResourceData() { } + public Azure.ResourceManager.AppPlatform.Models.ServiceRegistryProperties Properties { get { throw null; } set { } } + } + public partial class ServiceResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ServiceResource() { } + public virtual Azure.ResourceManager.AppPlatform.ServiceResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName) { 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 DisableTestEndpoint(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DisableTestEndpointAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + 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 GetApiPortalResource(string apiPortalName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetApiPortalResourceAsync(string apiPortalName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.ApiPortalResourceCollection GetApiPortalResources() { throw null; } + public virtual Azure.Response GetAppResource(string appName, string syncStatus = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAppResourceAsync(string appName, string syncStatus = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.AppResourceCollection GetAppResources() { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetBuildService(string buildServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBuildServiceAsync(string buildServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.BuildServiceCollection GetBuildServices() { throw null; } + public virtual Azure.Response GetCertificateResource(string certificateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetCertificateResourceAsync(string certificateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.CertificateResourceCollection GetCertificateResources() { throw null; } + public virtual Azure.ResourceManager.AppPlatform.ConfigServerResource GetConfigServerResource() { throw null; } + public virtual Azure.Response GetConfigurationServiceResource(string configurationServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetConfigurationServiceResourceAsync(string configurationServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.ConfigurationServiceResourceCollection GetConfigurationServiceResources() { throw null; } + public virtual Azure.Pageable GetForClusterDeployments(System.Collections.Generic.IEnumerable version = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetForClusterDeploymentsAsync(System.Collections.Generic.IEnumerable version = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetGatewayResource(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetGatewayResourceAsync(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.GatewayResourceCollection GetGatewayResources() { throw null; } + public virtual Azure.ResourceManager.AppPlatform.MonitoringSettingResource GetMonitoringSettingResource() { throw null; } + public virtual Azure.Response GetServiceRegistryResource(string serviceRegistryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetServiceRegistryResourceAsync(string serviceRegistryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.ServiceRegistryResourceCollection GetServiceRegistryResources() { throw null; } + public virtual Azure.Response GetStorageResource(string storageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetStorageResourceAsync(string storageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.StorageResourceCollection GetStorageResources() { 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.RegenerateTestKeyRequestPayload regenerateTestKeyRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RegenerateTestKeyAsync(Azure.ResourceManager.AppPlatform.Models.RegenerateTestKeyRequestPayload regenerateTestKeyRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Stop(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StopAsync(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.ServiceResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.ServiceResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ValidateConfigServer(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.ConfigServerSettings configServerSettings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ValidateConfigServerAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.ConfigServerSettings configServerSettings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ServiceResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ServiceResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string serviceName, Azure.ResourceManager.AppPlatform.ServiceResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string serviceName, Azure.ResourceManager.AppPlatform.ServiceResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string serviceName, 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 serviceName, 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 ServiceResourceData : Azure.ResourceManager.Models.TrackedResourceData + { + public ServiceResourceData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.AppPlatform.Models.ClusterResourceProperties Properties { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.AppPlatformSku Sku { get { throw null; } set { } } + } + public partial class StorageResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected StorageResource() { } + public virtual Azure.ResourceManager.AppPlatform.StorageResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string storageName) { 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.StorageResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.StorageResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class StorageResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected StorageResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string storageName, Azure.ResourceManager.AppPlatform.StorageResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string storageName, Azure.ResourceManager.AppPlatform.StorageResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string storageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string storageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string storageName, 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 storageName, 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 StorageResourceData : Azure.ResourceManager.Models.ResourceData + { + public StorageResourceData() { } + public Azure.ResourceManager.AppPlatform.Models.StorageProperties Properties { get { throw null; } set { } } + } + public partial class SupportedBuildpackResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected SupportedBuildpackResource() { } + public virtual Azure.ResourceManager.AppPlatform.SupportedBuildpackResourceData 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 buildpackName) { 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 SupportedBuildpackResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SupportedBuildpackResourceCollection() { } + public virtual Azure.Response Exists(string buildpackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string buildpackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string buildpackName, 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 buildpackName, 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 SupportedBuildpackResourceData : Azure.ResourceManager.Models.ResourceData + { + public SupportedBuildpackResourceData() { } + public string SupportedBuildpackId { get { throw null; } set { } } + } + public partial class SupportedStackResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected SupportedStackResource() { } + public virtual Azure.ResourceManager.AppPlatform.SupportedStackResourceData 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 stackName) { 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 SupportedStackResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SupportedStackResourceCollection() { } + public virtual Azure.Response Exists(string stackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string stackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string stackName, 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 stackName, 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 SupportedStackResourceData : Azure.ResourceManager.Models.ResourceData + { + public SupportedStackResourceData() { } + public Azure.ResourceManager.AppPlatform.Models.SupportedStackResourceProperties Properties { get { throw null; } set { } } + } +} +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class ActiveDeploymentCollection + { + public ActiveDeploymentCollection() { } + public System.Collections.Generic.IList ActiveDeploymentNames { get { throw null; } } + } + public partial class ApiPortalInstance + { + internal ApiPortalInstance() { } + public string Name { get { throw null; } } + public string Status { get { throw null; } } + } + public partial class ApiPortalProperties + { + public ApiPortalProperties() { } + public System.Collections.Generic.IList GatewayIds { get { throw null; } } + public bool? HttpsOnly { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList Instances { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.ApiPortalProvisioningState? ProvisioningState { get { throw null; } } + public bool? Public { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.ApiPortalResourceRequests ResourceRequests { get { throw null; } } + public System.Collections.Generic.IList SourceUrls { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.SsoProperties 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 ApiPortalProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ApiPortalProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.ApiPortalProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ApiPortalProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ApiPortalProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ApiPortalProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ApiPortalProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.ApiPortalProvisioningState 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.ApiPortalProvisioningState left, Azure.ResourceManager.AppPlatform.Models.ApiPortalProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.ApiPortalProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.ApiPortalProvisioningState left, Azure.ResourceManager.AppPlatform.Models.ApiPortalProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ApiPortalResourceRequests + { + internal ApiPortalResourceRequests() { } + public string Cpu { get { throw null; } } + public string Memory { get { throw null; } } + } + public partial class AppPlatformSku + { + public AppPlatformSku() { } + public int? Capacity { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string Tier { get { throw null; } set { } } + } + public partial class AppResourceProperties + { + public AppResourceProperties() { } + public System.Collections.Generic.IDictionary> AddonConfigs { get { throw null; } } + public System.Collections.Generic.IList CustomPersistentDisks { get { throw null; } } + public bool? EnableEndToEndTLS { get { throw null; } set { } } + public string Fqdn { get { throw null; } set { } } + public bool? HttpsOnly { get { throw null; } set { } } + public System.Collections.Generic.IList LoadedCertificates { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.PersistentDisk PersistentDisk { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.AppResourceProvisioningState? ProvisioningState { get { throw null; } } + public bool? Public { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.TemporaryDisk TemporaryDisk { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AppResourceProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AppResourceProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.AppResourceProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.AppResourceProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.AppResourceProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.AppResourceProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.AppResourceProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.AppResourceProvisioningState 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.AppResourceProvisioningState left, Azure.ResourceManager.AppPlatform.Models.AppResourceProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.AppResourceProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.AppResourceProvisioningState left, Azure.ResourceManager.AppPlatform.Models.AppResourceProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AzureFileVolume : Azure.ResourceManager.AppPlatform.Models.CustomPersistentDiskProperties + { + public AzureFileVolume(string mountPath, string shareName) : base (default(string)) { } + public string ShareName { get { throw null; } set { } } + } + public partial class BindingResourceProperties + { + public BindingResourceProperties() { } + public System.Collections.Generic.IDictionary BindingParameters { get { throw null; } } + public string CreatedAt { get { throw null; } } + public string GeneratedProperties { get { throw null; } } + public string Key { get { throw null; } set { } } + public string ResourceId { get { throw null; } set { } } + public string ResourceName { get { throw null; } } + public string ResourceType { get { throw null; } } + public string UpdatedAt { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BindingType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BindingType(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.BindingType ApacheSkyWalking { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BindingType AppDynamics { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BindingType ApplicationInsights { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BindingType Dynatrace { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BindingType ElasticAPM { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BindingType NewRelic { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.BindingType 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.BindingType left, Azure.ResourceManager.AppPlatform.Models.BindingType right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.BindingType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.BindingType left, Azure.ResourceManager.AppPlatform.Models.BindingType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BuilderProperties + { + public BuilderProperties() { } + public System.Collections.Generic.IList BuildpackGroups { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.BuilderProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.StackProperties Stack { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BuilderProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BuilderProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.BuilderProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BuilderProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BuilderProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BuilderProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BuilderProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.BuilderProvisioningState 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.BuilderProvisioningState left, Azure.ResourceManager.AppPlatform.Models.BuilderProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.BuilderProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.BuilderProvisioningState left, Azure.ResourceManager.AppPlatform.Models.BuilderProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BuildpackBindingLaunchProperties + { + public BuildpackBindingLaunchProperties() { } + public System.Collections.Generic.IDictionary Properties { get { throw null; } } + public System.Collections.Generic.IDictionary Secrets { get { throw null; } } + } + public partial class BuildpackBindingProperties + { + public BuildpackBindingProperties() { } + public Azure.ResourceManager.AppPlatform.Models.BindingType? BindingType { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.BuildpackBindingLaunchProperties LaunchProperties { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.BuildpackBindingProvisioningState? ProvisioningState { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BuildpackBindingProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BuildpackBindingProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.BuildpackBindingProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BuildpackBindingProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BuildpackBindingProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BuildpackBindingProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BuildpackBindingProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.BuildpackBindingProvisioningState 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.BuildpackBindingProvisioningState left, Azure.ResourceManager.AppPlatform.Models.BuildpackBindingProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.BuildpackBindingProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.BuildpackBindingProvisioningState left, Azure.ResourceManager.AppPlatform.Models.BuildpackBindingProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BuildpacksGroupProperties + { + public BuildpacksGroupProperties() { } + public System.Collections.Generic.IList Buildpacks { get { throw null; } } + public string Name { get { throw null; } set { } } + } + public partial class BuildProperties + { + public BuildProperties() { } + public string AgentPool { get { throw null; } set { } } + public string Builder { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Env { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.BuildProvisioningState? ProvisioningState { get { throw null; } } + public string RelativePath { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier TriggeredBuildResultId { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BuildProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BuildProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.BuildProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BuildProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BuildProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BuildProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BuildProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.BuildProvisioningState 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.BuildProvisioningState left, Azure.ResourceManager.AppPlatform.Models.BuildProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.BuildProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.BuildProvisioningState left, Azure.ResourceManager.AppPlatform.Models.BuildProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BuildResultLog + { + internal BuildResultLog() { } + public System.Uri BlobUri { get { throw null; } } + } + public partial class BuildResultProperties + { + public BuildResultProperties() { } + public string BuildPodName { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList BuildStages { get { throw null; } } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.BuildResultProvisioningState? ProvisioningState { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BuildResultProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BuildResultProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.BuildResultProvisioningState Building { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BuildResultProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BuildResultProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BuildResultProvisioningState Queuing { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BuildResultProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.BuildResultProvisioningState 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.BuildResultProvisioningState left, Azure.ResourceManager.AppPlatform.Models.BuildResultProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.BuildResultProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.BuildResultProvisioningState left, Azure.ResourceManager.AppPlatform.Models.BuildResultProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BuildResultUserSourceInfo : Azure.ResourceManager.AppPlatform.Models.UserSourceInfo + { + public BuildResultUserSourceInfo() { } + public string BuildResultId { get { throw null; } set { } } + } + public partial class BuildServiceAgentPoolProperties + { + public BuildServiceAgentPoolProperties() { } + public Azure.ResourceManager.AppPlatform.Models.BuildServiceAgentPoolSizeProperties PoolSize { get { throw null; } set { } } + public string ProvisioningState { get { throw null; } } + } + public partial class BuildServiceAgentPoolSizeProperties + { + public BuildServiceAgentPoolSizeProperties() { } + public string Cpu { get { throw null; } } + public string Memory { get { throw null; } } + public string Name { get { throw null; } set { } } + } + public partial class BuildServiceProperties + { + public BuildServiceProperties() { } + public string KPackVersion { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.BuildServiceProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.BuildServicePropertiesResourceRequests ResourceRequests { get { throw null; } set { } } + } + public partial class BuildServicePropertiesResourceRequests + { + public BuildServicePropertiesResourceRequests() { } + public string Cpu { get { throw null; } } + public string Memory { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BuildServiceProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BuildServiceProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.BuildServiceProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BuildServiceProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BuildServiceProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BuildServiceProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BuildServiceProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.BuildServiceProvisioningState 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.BuildServiceProvisioningState left, Azure.ResourceManager.AppPlatform.Models.BuildServiceProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.BuildServiceProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.BuildServiceProvisioningState left, Azure.ResourceManager.AppPlatform.Models.BuildServiceProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BuildStageProperties + { + internal BuildStageProperties() { } + public string Name { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.KPackBuildStageProvisioningState? Status { get { throw null; } } + } + public partial class CertificateProperties + { + public CertificateProperties() { } + public string ActivateDate { get { throw null; } } + public System.Collections.Generic.IReadOnlyList DnsNames { get { throw null; } } + public string ExpirationDate { get { throw null; } } + public string IssuedDate { get { throw null; } } + public string Issuer { get { throw null; } } + public string SubjectName { get { throw null; } } + public string Thumbprint { get { throw null; } } + } + public partial class ClusterResourceProperties + { + public ClusterResourceProperties() { } + public string Fqdn { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.NetworkProfile NetworkProfile { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.PowerState? PowerState { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public string ServiceId { get { throw null; } } + public int? Version { get { throw null; } } + public bool? ZoneRedundant { get { throw null; } set { } } + } + public partial class ConfigServerGitProperty + { + public ConfigServerGitProperty(System.Uri uri) { } + public string HostKey { get { throw null; } set { } } + public string HostKeyAlgorithm { get { throw null; } set { } } + public string Label { get { throw null; } set { } } + public string Password { get { throw null; } set { } } + public string PrivateKey { get { throw null; } set { } } + public System.Collections.Generic.IList Repositories { get { throw null; } } + public System.Collections.Generic.IList SearchPaths { get { throw null; } } + public bool? StrictHostKeyChecking { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } set { } } + public string Username { get { throw null; } set { } } + } + public partial class ConfigServerProperties + { + public ConfigServerProperties() { } + public Azure.ResourceManager.AppPlatform.Models.ConfigServerGitProperty ConfigServerGitProperty { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.Error Error { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.ConfigServerState? ProvisioningState { get { throw null; } } + } + public partial class ConfigServerSettings + { + public ConfigServerSettings() { } + public Azure.ResourceManager.AppPlatform.Models.ConfigServerGitProperty GitProperty { get { throw null; } set { } } + } + public partial class ConfigServerSettingsErrorRecord + { + internal ConfigServerSettingsErrorRecord() { } + public System.Collections.Generic.IReadOnlyList Messages { get { throw null; } } + public string Name { get { throw null; } } + public System.Uri Uri { get { throw null; } } + } + public partial class ConfigServerSettingsValidateResult + { + internal ConfigServerSettingsValidateResult() { } + public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } + public bool? IsValid { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ConfigServerState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ConfigServerState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.ConfigServerState Deleted { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ConfigServerState Failed { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ConfigServerState NotAvailable { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ConfigServerState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ConfigServerState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.ConfigServerState 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.ConfigServerState left, Azure.ResourceManager.AppPlatform.Models.ConfigServerState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.ConfigServerState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.ConfigServerState left, Azure.ResourceManager.AppPlatform.Models.ConfigServerState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ConfigurationServiceGitPropertyValidateResult + { + internal ConfigurationServiceGitPropertyValidateResult() { } + public System.Collections.Generic.IReadOnlyList GitReposValidationResult { get { throw null; } } + public bool? IsValid { get { throw null; } } + } + public partial class ConfigurationServiceGitRepository + { + public ConfigurationServiceGitRepository(string name, System.Collections.Generic.IEnumerable patterns, System.Uri uri, string label) { } + public string HostKey { get { throw null; } set { } } + public string HostKeyAlgorithm { get { throw null; } set { } } + public string Label { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string Password { get { throw null; } set { } } + public System.Collections.Generic.IList Patterns { get { throw null; } } + public string PrivateKey { get { throw null; } set { } } + public System.Collections.Generic.IList SearchPaths { get { throw null; } } + public bool? StrictHostKeyChecking { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } set { } } + public string Username { get { throw null; } set { } } + } + public partial class ConfigurationServiceInstance + { + internal ConfigurationServiceInstance() { } + public string Name { get { throw null; } } + public string Status { get { throw null; } } + } + public partial class ConfigurationServiceProperties + { + public ConfigurationServiceProperties() { } + public System.Collections.Generic.IList GitPropertyRepositories { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Instances { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.ConfigurationServiceProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.ConfigurationServiceResourceRequests ResourceRequests { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ConfigurationServiceProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ConfigurationServiceProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.ConfigurationServiceProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ConfigurationServiceProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ConfigurationServiceProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ConfigurationServiceProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ConfigurationServiceProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.ConfigurationServiceProvisioningState 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.ConfigurationServiceProvisioningState left, Azure.ResourceManager.AppPlatform.Models.ConfigurationServiceProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.ConfigurationServiceProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.ConfigurationServiceProvisioningState left, Azure.ResourceManager.AppPlatform.Models.ConfigurationServiceProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ConfigurationServiceResourceRequests + { + internal ConfigurationServiceResourceRequests() { } + public string Cpu { get { throw null; } } + public int? InstanceCount { get { throw null; } } + public string Memory { get { throw null; } } + } + public partial class ConfigurationServiceSettings + { + public ConfigurationServiceSettings() { } + public System.Collections.Generic.IList GitPropertyRepositories { get { throw null; } } + } + public partial class ConfigurationServiceSettingsValidateResult + { + internal ConfigurationServiceSettingsValidateResult() { } + public Azure.ResourceManager.AppPlatform.Models.ConfigurationServiceGitPropertyValidateResult GitPropertyValidationResult { get { throw null; } } + } + public partial class ContentCertificateProperties : Azure.ResourceManager.AppPlatform.Models.CertificateProperties + { + public ContentCertificateProperties() { } + public string Content { get { throw null; } set { } } + } + public partial class CustomContainer + { + public CustomContainer() { } + public System.Collections.Generic.IList Args { get { throw null; } } + public System.Collections.Generic.IList Command { get { throw null; } } + public string ContainerImage { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.ImageRegistryCredential ImageRegistryCredential { get { throw null; } set { } } + public string LanguageFramework { get { throw null; } set { } } + public string Server { get { throw null; } set { } } + } + public partial class CustomContainerUserSourceInfo : Azure.ResourceManager.AppPlatform.Models.UserSourceInfo + { + public CustomContainerUserSourceInfo() { } + public Azure.ResourceManager.AppPlatform.Models.CustomContainer CustomContainer { get { throw null; } set { } } + } + public partial class CustomDomainProperties + { + public CustomDomainProperties() { } + public string AppName { get { throw null; } } + public string CertName { get { throw null; } set { } } + public string Thumbprint { get { throw null; } set { } } + } + public partial class CustomDomainValidatePayload + { + public CustomDomainValidatePayload(string name) { } + public string Name { get { throw null; } } + } + public partial class CustomDomainValidateResult + { + internal CustomDomainValidateResult() { } + public bool? IsValid { get { throw null; } } + public string Message { get { throw null; } } + } + public partial class CustomPersistentDiskProperties + { + public CustomPersistentDiskProperties(string mountPath) { } + public System.Collections.Generic.IList MountOptions { get { throw null; } } + public string MountPath { get { throw null; } set { } } + public bool? ReadOnly { get { throw null; } set { } } + } + public partial class CustomPersistentDiskResource + { + public CustomPersistentDiskResource(string storageId) { } + public Azure.ResourceManager.AppPlatform.Models.CustomPersistentDiskProperties CustomPersistentDiskProperties { get { throw null; } set { } } + public string StorageId { get { throw null; } set { } } + } + public partial class DeploymentInstance + { + internal DeploymentInstance() { } + public string DiscoveryStatus { get { throw null; } } + public string Name { get { throw null; } } + public string Reason { get { throw null; } } + public string StartTime { get { throw null; } } + public string Status { get { throw null; } } + public string Zone { get { throw null; } } + } + public partial class DeploymentResourceProperties + { + public DeploymentResourceProperties() { } + public bool? Active { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.DeploymentSettings DeploymentSettings { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList Instances { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.DeploymentResourceProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.UserSourceInfo Source { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.DeploymentResourceStatus? Status { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DeploymentResourceProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DeploymentResourceProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.DeploymentResourceProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.DeploymentResourceProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.DeploymentResourceProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.DeploymentResourceProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.DeploymentResourceProvisioningState 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.DeploymentResourceProvisioningState left, Azure.ResourceManager.AppPlatform.Models.DeploymentResourceProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.DeploymentResourceProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.DeploymentResourceProvisioningState left, Azure.ResourceManager.AppPlatform.Models.DeploymentResourceProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DeploymentResourceStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DeploymentResourceStatus(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.DeploymentResourceStatus Running { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.DeploymentResourceStatus Stopped { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.DeploymentResourceStatus 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.DeploymentResourceStatus left, Azure.ResourceManager.AppPlatform.Models.DeploymentResourceStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.DeploymentResourceStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.DeploymentResourceStatus left, Azure.ResourceManager.AppPlatform.Models.DeploymentResourceStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DeploymentSettings + { + public DeploymentSettings() { } + public System.Collections.Generic.IDictionary> AddonConfigs { get { throw null; } } + public bool? DisableProbe { get { throw null; } set { } } + public System.Collections.Generic.IDictionary EnvironmentVariables { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.ResourceRequests ResourceRequests { get { throw null; } set { } } + } + public partial class DiagnosticParameters + { + public DiagnosticParameters() { } + public string AppInstance { get { throw null; } set { } } + public string DurationValue { get { throw null; } set { } } + public string FilePath { get { throw null; } set { } } + } + public partial class Error + { + public Error() { } + public string Code { get { throw null; } set { } } + public string Message { get { throw null; } set { } } + } + public partial class GatewayApiMetadataProperties + { + public GatewayApiMetadataProperties() { } + public string Description { get { throw null; } set { } } + public string Documentation { get { throw null; } set { } } + public System.Uri ServerUri { get { throw null; } set { } } + public string Title { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + } + public partial class GatewayApiRoute + { + public GatewayApiRoute() { } + public string Description { get { throw null; } set { } } + public System.Collections.Generic.IList Filters { get { throw null; } } + public int? Order { get { throw null; } set { } } + public System.Collections.Generic.IList Predicates { get { throw null; } } + public bool? SsoEnabled { get { throw null; } set { } } + public System.Collections.Generic.IList Tags { get { throw null; } } + public string Title { get { throw null; } set { } } + public bool? TokenRelay { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } set { } } + } + public partial class GatewayCorsProperties + { + public GatewayCorsProperties() { } + public bool? AllowCredentials { get { throw null; } set { } } + public System.Collections.Generic.IList AllowedHeaders { get { throw null; } } + public System.Collections.Generic.IList AllowedMethods { get { throw null; } } + public System.Collections.Generic.IList AllowedOrigins { get { throw null; } } + public System.Collections.Generic.IList ExposedHeaders { get { throw null; } } + public int? MaxAge { get { throw null; } set { } } + } + public partial class GatewayInstance + { + internal GatewayInstance() { } + public string Name { get { throw null; } } + public string Status { get { throw null; } } + } + public partial class GatewayOperatorProperties + { + internal GatewayOperatorProperties() { } + public System.Collections.Generic.IReadOnlyList Instances { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.GatewayOperatorResourceRequests ResourceRequests { get { throw null; } } + } + public partial class GatewayOperatorResourceRequests + { + internal GatewayOperatorResourceRequests() { } + public string Cpu { get { throw null; } } + public int? InstanceCount { get { throw null; } } + public string Memory { get { throw null; } } + } + public partial class GatewayProperties + { + public GatewayProperties() { } + public Azure.ResourceManager.AppPlatform.Models.GatewayApiMetadataProperties ApiMetadataProperties { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.GatewayCorsProperties CorsProperties { get { throw null; } set { } } + public bool? HttpsOnly { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList Instances { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.GatewayOperatorProperties OperatorProperties { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.GatewayProvisioningState? ProvisioningState { get { throw null; } } + public bool? Public { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.GatewayResourceRequests ResourceRequests { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.SsoProperties 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 GatewayProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public GatewayProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.GatewayProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.GatewayProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.GatewayProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.GatewayProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.GatewayProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.GatewayProvisioningState 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.GatewayProvisioningState left, Azure.ResourceManager.AppPlatform.Models.GatewayProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.GatewayProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.GatewayProvisioningState left, Azure.ResourceManager.AppPlatform.Models.GatewayProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class GatewayResourceRequests + { + public GatewayResourceRequests() { } + public string Cpu { get { throw null; } set { } } + public string Memory { get { throw null; } set { } } + } + public partial class GatewayRouteConfigProperties + { + public GatewayRouteConfigProperties() { } + public string AppResourceId { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.GatewayProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IList Routes { get { throw null; } } + } + public partial class GitPatternRepository + { + public GitPatternRepository(string name, System.Uri uri) { } + public string HostKey { get { throw null; } set { } } + public string HostKeyAlgorithm { get { throw null; } set { } } + public string Label { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string Password { get { throw null; } set { } } + public System.Collections.Generic.IList Pattern { get { throw null; } } + public string PrivateKey { get { throw null; } set { } } + public System.Collections.Generic.IList SearchPaths { get { throw null; } } + public bool? StrictHostKeyChecking { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } set { } } + public string Username { get { throw null; } set { } } + } + public partial class ImageRegistryCredential + { + public ImageRegistryCredential() { } + public string Password { get { throw null; } set { } } + public string Username { get { throw null; } set { } } + } + public partial class JarUploadedUserSourceInfo : Azure.ResourceManager.AppPlatform.Models.UploadedUserSourceInfo + { + public JarUploadedUserSourceInfo() { } + public string JvmOptions { get { throw null; } set { } } + public string RuntimeVersion { get { throw null; } set { } } + } + public partial class KeyVaultCertificateProperties : Azure.ResourceManager.AppPlatform.Models.CertificateProperties + { + public KeyVaultCertificateProperties(System.Uri vaultUri, string keyVaultCertName) { } + public string CertVersion { get { throw null; } set { } } + public bool? ExcludePrivateKey { get { throw null; } set { } } + public string KeyVaultCertName { get { throw null; } set { } } + public System.Uri VaultUri { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct KPackBuildStageProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public KPackBuildStageProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.KPackBuildStageProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.KPackBuildStageProvisioningState NotStarted { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.KPackBuildStageProvisioningState Running { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.KPackBuildStageProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.KPackBuildStageProvisioningState 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.KPackBuildStageProvisioningState left, Azure.ResourceManager.AppPlatform.Models.KPackBuildStageProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.KPackBuildStageProvisioningState (string value) { throw null; } + 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 LoadedCertificate + { + public LoadedCertificate(string resourceId) { } + public bool? LoadTrustStore { get { throw null; } set { } } + public string ResourceId { get { throw null; } set { } } + } + public partial class LogFileUrlResponse + { + internal LogFileUrlResponse() { } + public System.Uri Uri { get { throw null; } } + } + public partial class MonitoringSettingProperties + { + public MonitoringSettingProperties() { } + public string AppInsightsAgentVersionsJava { get { throw null; } } + public string AppInsightsInstrumentationKey { get { throw null; } set { } } + public double? AppInsightsSamplingRate { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.Error Error { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.MonitoringSettingState? ProvisioningState { get { throw null; } } + public bool? TraceEnabled { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MonitoringSettingState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MonitoringSettingState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.MonitoringSettingState Failed { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.MonitoringSettingState NotAvailable { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.MonitoringSettingState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.MonitoringSettingState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.MonitoringSettingState 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.MonitoringSettingState left, Azure.ResourceManager.AppPlatform.Models.MonitoringSettingState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.MonitoringSettingState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.MonitoringSettingState left, Azure.ResourceManager.AppPlatform.Models.MonitoringSettingState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NameAvailability + { + internal NameAvailability() { } + public string Message { get { throw null; } } + public bool? NameAvailable { get { throw null; } } + public string Reason { get { throw null; } } + } + public partial class NameAvailabilityContent + { + public NameAvailabilityContent(string resourceType, string name) { } + public string Name { get { throw null; } } + public string ResourceType { get { throw null; } } + } + public partial class NetCoreZipUploadedUserSourceInfo : Azure.ResourceManager.AppPlatform.Models.UploadedUserSourceInfo + { + public NetCoreZipUploadedUserSourceInfo() { } + public string NetCoreMainEntryPath { get { throw null; } set { } } + public string RuntimeVersion { get { throw null; } set { } } + } + public partial class NetworkProfile + { + public NetworkProfile() { } + public string AppNetworkResourceGroup { get { throw null; } set { } } + public string AppSubnetId { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList OutboundPublicIPs { get { throw null; } } + public System.Collections.Generic.IReadOnlyList RequiredTraffics { get { throw null; } } + public string ServiceCidr { get { throw null; } set { } } + public string ServiceRuntimeNetworkResourceGroup { get { throw null; } set { } } + public string ServiceRuntimeSubnetId { get { throw null; } set { } } + } + public partial class PersistentDisk + { + public PersistentDisk() { } + public string MountPath { get { throw null; } set { } } + public int? SizeInGB { get { throw null; } set { } } + public int? UsedInGB { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PowerState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PowerState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.PowerState Running { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.PowerState Stopped { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.PowerState 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.PowerState left, Azure.ResourceManager.AppPlatform.Models.PowerState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.PowerState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.PowerState left, Azure.ResourceManager.AppPlatform.Models.PowerState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.ProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ProvisioningState Deleted { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ProvisioningState Moved { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ProvisioningState MoveFailed { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ProvisioningState Moving { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ProvisioningState Starting { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ProvisioningState Stopping { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.ProvisioningState 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.ProvisioningState left, Azure.ResourceManager.AppPlatform.Models.ProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.ProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.ProvisioningState left, Azure.ResourceManager.AppPlatform.Models.ProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class RegenerateTestKeyRequestPayload + { + public RegenerateTestKeyRequestPayload(Azure.ResourceManager.AppPlatform.Models.TestKeyType keyType) { } + public Azure.ResourceManager.AppPlatform.Models.TestKeyType KeyType { get { throw null; } } + } + public partial class RequiredTraffic + { + internal RequiredTraffic() { } + public Azure.ResourceManager.AppPlatform.Models.TrafficDirection? Direction { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Fqdns { get { throw null; } } + public System.Collections.Generic.IReadOnlyList IPs { get { throw null; } } + public int? Port { get { throw null; } } + public string Protocol { get { throw null; } } + } + public partial class ResourceRequests + { + public ResourceRequests() { } + public string Cpu { get { throw null; } set { } } + public string Memory { get { throw null; } set { } } + } + public partial class ResourceSku + { + internal ResourceSku() { } + public Azure.ResourceManager.AppPlatform.Models.SkuCapacity Capacity { get { throw null; } } + public System.Collections.Generic.IReadOnlyList LocationInfo { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Locations { get { throw null; } } + public string Name { get { throw null; } } + public string ResourceType { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Restrictions { get { throw null; } } + public string Tier { get { throw null; } } + } + public partial class ResourceSkuCapabilities + { + internal ResourceSkuCapabilities() { } + public string Name { get { throw null; } } + public string Value { get { throw null; } } + } + public partial class ResourceSkuLocationInfo + { + internal ResourceSkuLocationInfo() { } + public string Location { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ZoneDetails { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Zones { get { throw null; } } + } + public partial class ResourceSkuRestrictionInfo + { + internal ResourceSkuRestrictionInfo() { } + public System.Collections.Generic.IReadOnlyList Locations { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Zones { get { throw null; } } + } + public partial class ResourceSkuRestrictions + { + internal ResourceSkuRestrictions() { } + public Azure.ResourceManager.AppPlatform.Models.ResourceSkuRestrictionsReasonCode? ReasonCode { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.ResourceSkuRestrictionInfo RestrictionInfo { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.ResourceSkuRestrictionsType? RestrictionsType { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Values { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceSkuRestrictionsReasonCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceSkuRestrictionsReasonCode(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.ResourceSkuRestrictionsReasonCode NotAvailableForSubscription { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ResourceSkuRestrictionsReasonCode QuotaId { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.ResourceSkuRestrictionsReasonCode 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.ResourceSkuRestrictionsReasonCode left, Azure.ResourceManager.AppPlatform.Models.ResourceSkuRestrictionsReasonCode right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.ResourceSkuRestrictionsReasonCode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.ResourceSkuRestrictionsReasonCode left, Azure.ResourceManager.AppPlatform.Models.ResourceSkuRestrictionsReasonCode right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceSkuRestrictionsType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceSkuRestrictionsType(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.ResourceSkuRestrictionsType Location { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ResourceSkuRestrictionsType Zone { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.ResourceSkuRestrictionsType 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.ResourceSkuRestrictionsType left, Azure.ResourceManager.AppPlatform.Models.ResourceSkuRestrictionsType right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.ResourceSkuRestrictionsType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.ResourceSkuRestrictionsType left, Azure.ResourceManager.AppPlatform.Models.ResourceSkuRestrictionsType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ResourceSkuZoneDetails + { + internal ResourceSkuZoneDetails() { } + public System.Collections.Generic.IReadOnlyList Capabilities { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Name { get { throw null; } } + } + public partial class ResourceUploadDefinition + { + internal ResourceUploadDefinition() { } + public string RelativePath { get { throw null; } } + public System.Uri UploadUri { get { throw null; } } + } + public partial class ServiceRegistryInstance + { + internal ServiceRegistryInstance() { } + public string Name { get { throw null; } } + public string Status { get { throw null; } } + } + public partial class ServiceRegistryProperties + { + public ServiceRegistryProperties() { } + public System.Collections.Generic.IReadOnlyList Instances { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.ServiceRegistryProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.ServiceRegistryResourceRequests ResourceRequests { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ServiceRegistryProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ServiceRegistryProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.ServiceRegistryProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ServiceRegistryProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ServiceRegistryProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ServiceRegistryProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.ServiceRegistryProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.ServiceRegistryProvisioningState 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.ServiceRegistryProvisioningState left, Azure.ResourceManager.AppPlatform.Models.ServiceRegistryProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.ServiceRegistryProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.ServiceRegistryProvisioningState left, Azure.ResourceManager.AppPlatform.Models.ServiceRegistryProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ServiceRegistryResourceRequests + { + internal ServiceRegistryResourceRequests() { } + public string Cpu { get { throw null; } } + public int? InstanceCount { get { throw null; } } + public string Memory { get { throw null; } } + } + public partial class SkuCapacity + { + internal SkuCapacity() { } + public int? Default { get { throw null; } } + public int? Maximum { get { throw null; } } + public int Minimum { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.SkuScaleType? ScaleType { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SkuScaleType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SkuScaleType(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.SkuScaleType Automatic { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.SkuScaleType Manual { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.SkuScaleType None { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.SkuScaleType 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.SkuScaleType left, Azure.ResourceManager.AppPlatform.Models.SkuScaleType right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.SkuScaleType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.SkuScaleType left, Azure.ResourceManager.AppPlatform.Models.SkuScaleType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SourceUploadedUserSourceInfo : Azure.ResourceManager.AppPlatform.Models.UploadedUserSourceInfo + { + public SourceUploadedUserSourceInfo() { } + public string ArtifactSelector { get { throw null; } set { } } + public string RuntimeVersion { get { throw null; } set { } } + } + public partial class SsoProperties + { + public SsoProperties() { } + public string ClientId { get { throw null; } set { } } + public string ClientSecret { get { throw null; } set { } } + public System.Uri IssuerUri { get { throw null; } set { } } + public System.Collections.Generic.IList Scope { get { throw null; } } + } + public partial class StackProperties + { + public StackProperties() { } + public string Id { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + } + public partial class StorageAccount : Azure.ResourceManager.AppPlatform.Models.StorageProperties + { + public StorageAccount(string accountName, string accountKey) { } + public string AccountKey { get { throw null; } set { } } + public string AccountName { get { throw null; } set { } } + } + public partial class StorageProperties + { + public StorageProperties() { } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SupportedRuntimePlatform : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SupportedRuntimePlatform(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.SupportedRuntimePlatform Java { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.SupportedRuntimePlatform NETCore { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.SupportedRuntimePlatform 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.SupportedRuntimePlatform left, Azure.ResourceManager.AppPlatform.Models.SupportedRuntimePlatform right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.SupportedRuntimePlatform (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.SupportedRuntimePlatform left, Azure.ResourceManager.AppPlatform.Models.SupportedRuntimePlatform right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SupportedRuntimeValue : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SupportedRuntimeValue(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.SupportedRuntimeValue Java11 { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.SupportedRuntimeValue Java17 { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.SupportedRuntimeValue Java8 { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.SupportedRuntimeValue NetCore31 { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.SupportedRuntimeValue 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.SupportedRuntimeValue left, Azure.ResourceManager.AppPlatform.Models.SupportedRuntimeValue right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.SupportedRuntimeValue (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.SupportedRuntimeValue left, Azure.ResourceManager.AppPlatform.Models.SupportedRuntimeValue right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SupportedRuntimeVersion + { + internal SupportedRuntimeVersion() { } + public Azure.ResourceManager.AppPlatform.Models.SupportedRuntimePlatform? Platform { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.SupportedRuntimeValue? Value { get { throw null; } } + public string Version { get { throw null; } } + } + public partial class SupportedStackResourceProperties + { + public SupportedStackResourceProperties() { } + public string StackId { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + } + public partial class TemporaryDisk + { + public TemporaryDisk() { } + public string MountPath { get { throw null; } set { } } + public int? SizeInGB { get { throw null; } set { } } + } + public partial class TestKeys + { + internal TestKeys() { } + public bool? Enabled { get { throw null; } } + public string PrimaryKey { get { throw null; } } + public string PrimaryTestEndpoint { get { throw null; } } + public string SecondaryKey { get { throw null; } } + public string SecondaryTestEndpoint { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct TestKeyType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TestKeyType(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.TestKeyType Primary { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.TestKeyType Secondary { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.TestKeyType 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.TestKeyType left, Azure.ResourceManager.AppPlatform.Models.TestKeyType right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.TestKeyType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.TestKeyType left, Azure.ResourceManager.AppPlatform.Models.TestKeyType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct TrafficDirection : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TrafficDirection(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.TrafficDirection Inbound { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.TrafficDirection Outbound { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.TrafficDirection 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.TrafficDirection left, Azure.ResourceManager.AppPlatform.Models.TrafficDirection right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.TrafficDirection (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.TrafficDirection left, Azure.ResourceManager.AppPlatform.Models.TrafficDirection right) { throw null; } + public override string ToString() { throw null; } + } + public partial class UploadedUserSourceInfo : Azure.ResourceManager.AppPlatform.Models.UserSourceInfo + { + public UploadedUserSourceInfo() { } + public string RelativePath { get { throw null; } set { } } + } + public partial class UserSourceInfo + { + public UserSourceInfo() { } + public string Version { get { throw null; } set { } } + } + public partial class ValidationMessages + { + internal ValidationMessages() { } + public System.Collections.Generic.IReadOnlyList Messages { get { throw null; } } + public string Name { get { throw null; } } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Azure.ResourceManager.AppPlatform.csproj b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Azure.ResourceManager.AppPlatform.csproj new file mode 100644 index 0000000000000..fe7c360384f4d --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Azure.ResourceManager.AppPlatform.csproj @@ -0,0 +1,8 @@ + + + 1.0.0-beta.1 + Azure.ResourceManager.AppPlatform + Azure Resource Manager client SDK for Azure resource provider AppPlatform + azure;management;arm;resource manager;appplatform + + diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalCustomDomainResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalCustomDomainResource.cs new file mode 100644 index 0000000000000..e53815b608883 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalCustomDomainResource.cs @@ -0,0 +1,249 @@ +// 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 ApiPortalCustomDomainResource 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 GetApiPortalCustomDomainResource method. + /// Otherwise you can get one from its parent resource using the GetApiPortalCustomDomainResource method. + /// + public partial class ApiPortalCustomDomainResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string apiPortalName, string domainName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains/{domainName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _apiPortalCustomDomainResourceApiPortalCustomDomainsClientDiagnostics; + private readonly ApiPortalCustomDomainsRestOperations _apiPortalCustomDomainResourceApiPortalCustomDomainsRestClient; + private readonly ApiPortalCustomDomainResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected ApiPortalCustomDomainResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ApiPortalCustomDomainResource(ArmClient client, ApiPortalCustomDomainResourceData 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 ApiPortalCustomDomainResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _apiPortalCustomDomainResourceApiPortalCustomDomainsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string apiPortalCustomDomainResourceApiPortalCustomDomainsApiVersion); + _apiPortalCustomDomainResourceApiPortalCustomDomainsRestClient = new ApiPortalCustomDomainsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, apiPortalCustomDomainResourceApiPortalCustomDomainsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/apiPortals/domains"; + + /// 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 ApiPortalCustomDomainResourceData 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 API portal custom domain. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains/{domainName} + /// Operation Id: ApiPortalCustomDomains_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _apiPortalCustomDomainResourceApiPortalCustomDomainsClientDiagnostics.CreateScope("ApiPortalCustomDomainResource.Get"); + scope.Start(); + try + { + var response = await _apiPortalCustomDomainResourceApiPortalCustomDomainsRestClient.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 ApiPortalCustomDomainResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the API portal custom domain. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains/{domainName} + /// Operation Id: ApiPortalCustomDomains_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _apiPortalCustomDomainResourceApiPortalCustomDomainsClientDiagnostics.CreateScope("ApiPortalCustomDomainResource.Get"); + scope.Start(); + try + { + var response = _apiPortalCustomDomainResourceApiPortalCustomDomainsRestClient.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 ApiPortalCustomDomainResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the API portal custom domain. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains/{domainName} + /// Operation Id: ApiPortalCustomDomains_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 = _apiPortalCustomDomainResourceApiPortalCustomDomainsClientDiagnostics.CreateScope("ApiPortalCustomDomainResource.Delete"); + scope.Start(); + try + { + var response = await _apiPortalCustomDomainResourceApiPortalCustomDomainsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_apiPortalCustomDomainResourceApiPortalCustomDomainsClientDiagnostics, Pipeline, _apiPortalCustomDomainResourceApiPortalCustomDomainsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the API portal custom domain. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains/{domainName} + /// Operation Id: ApiPortalCustomDomains_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 = _apiPortalCustomDomainResourceApiPortalCustomDomainsClientDiagnostics.CreateScope("ApiPortalCustomDomainResource.Delete"); + scope.Start(); + try + { + var response = _apiPortalCustomDomainResourceApiPortalCustomDomainsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_apiPortalCustomDomainResourceApiPortalCustomDomainsClientDiagnostics, Pipeline, _apiPortalCustomDomainResourceApiPortalCustomDomainsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update the API portal custom domain. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains/{domainName} + /// Operation Id: ApiPortalCustomDomains_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 API portal custom domain for the create or update operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ApiPortalCustomDomainResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _apiPortalCustomDomainResourceApiPortalCustomDomainsClientDiagnostics.CreateScope("ApiPortalCustomDomainResource.Update"); + scope.Start(); + try + { + var response = await _apiPortalCustomDomainResourceApiPortalCustomDomainsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new ApiPortalCustomDomainResourceOperationSource(Client), _apiPortalCustomDomainResourceApiPortalCustomDomainsClientDiagnostics, Pipeline, _apiPortalCustomDomainResourceApiPortalCustomDomainsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update the API portal custom domain. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains/{domainName} + /// Operation Id: ApiPortalCustomDomains_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 API portal custom domain for the create or update operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ApiPortalCustomDomainResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _apiPortalCustomDomainResourceApiPortalCustomDomainsClientDiagnostics.CreateScope("ApiPortalCustomDomainResource.Update"); + scope.Start(); + try + { + var response = _apiPortalCustomDomainResourceApiPortalCustomDomainsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new ApiPortalCustomDomainResourceOperationSource(Client), _apiPortalCustomDomainResourceApiPortalCustomDomainsClientDiagnostics, Pipeline, _apiPortalCustomDomainResourceApiPortalCustomDomainsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + 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/ApiPortalCustomDomainResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalCustomDomainResourceCollection.cs new file mode 100644 index 0000000000000..1c480a10d9186 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalCustomDomainResourceCollection.cs @@ -0,0 +1,333 @@ +// 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.Linq; +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 GetApiPortalCustomDomainResources method from an instance of . + /// + public partial class ApiPortalCustomDomainResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _apiPortalCustomDomainResourceApiPortalCustomDomainsClientDiagnostics; + private readonly ApiPortalCustomDomainsRestOperations _apiPortalCustomDomainResourceApiPortalCustomDomainsRestClient; + + /// Initializes a new instance of the class for mocking. + protected ApiPortalCustomDomainResourceCollection() + { + } + + /// 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 ApiPortalCustomDomainResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _apiPortalCustomDomainResourceApiPortalCustomDomainsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ApiPortalCustomDomainResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ApiPortalCustomDomainResource.ResourceType, out string apiPortalCustomDomainResourceApiPortalCustomDomainsApiVersion); + _apiPortalCustomDomainResourceApiPortalCustomDomainsRestClient = new ApiPortalCustomDomainsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, apiPortalCustomDomainResourceApiPortalCustomDomainsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ApiPortalResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ApiPortalResource.ResourceType), nameof(id)); + } + + /// + /// Create or update the API portal custom domain. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains/{domainName} + /// Operation Id: ApiPortalCustomDomains_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 API portal custom domain. + /// The API portal custom domain 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 domainName, ApiPortalCustomDomainResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _apiPortalCustomDomainResourceApiPortalCustomDomainsClientDiagnostics.CreateScope("ApiPortalCustomDomainResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _apiPortalCustomDomainResourceApiPortalCustomDomainsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new ApiPortalCustomDomainResourceOperationSource(Client), _apiPortalCustomDomainResourceApiPortalCustomDomainsClientDiagnostics, Pipeline, _apiPortalCustomDomainResourceApiPortalCustomDomainsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update the API portal custom domain. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains/{domainName} + /// Operation Id: ApiPortalCustomDomains_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 API portal custom domain. + /// The API portal custom domain 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 domainName, ApiPortalCustomDomainResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _apiPortalCustomDomainResourceApiPortalCustomDomainsClientDiagnostics.CreateScope("ApiPortalCustomDomainResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _apiPortalCustomDomainResourceApiPortalCustomDomainsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new ApiPortalCustomDomainResourceOperationSource(Client), _apiPortalCustomDomainResourceApiPortalCustomDomainsClientDiagnostics, Pipeline, _apiPortalCustomDomainResourceApiPortalCustomDomainsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the API portal custom domain. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains/{domainName} + /// Operation Id: ApiPortalCustomDomains_Get + /// + /// The name of the API portal custom domain. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var scope = _apiPortalCustomDomainResourceApiPortalCustomDomainsClientDiagnostics.CreateScope("ApiPortalCustomDomainResourceCollection.Get"); + scope.Start(); + try + { + var response = await _apiPortalCustomDomainResourceApiPortalCustomDomainsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ApiPortalCustomDomainResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the API portal custom domain. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains/{domainName} + /// Operation Id: ApiPortalCustomDomains_Get + /// + /// The name of the API portal custom domain. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var scope = _apiPortalCustomDomainResourceApiPortalCustomDomainsClientDiagnostics.CreateScope("ApiPortalCustomDomainResourceCollection.Get"); + scope.Start(); + try + { + var response = _apiPortalCustomDomainResourceApiPortalCustomDomainsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ApiPortalCustomDomainResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Handle requests to list all API portal custom domains. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains + /// Operation Id: ApiPortalCustomDomains_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) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _apiPortalCustomDomainResourceApiPortalCustomDomainsClientDiagnostics.CreateScope("ApiPortalCustomDomainResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _apiPortalCustomDomainResourceApiPortalCustomDomainsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new ApiPortalCustomDomainResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _apiPortalCustomDomainResourceApiPortalCustomDomainsClientDiagnostics.CreateScope("ApiPortalCustomDomainResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _apiPortalCustomDomainResourceApiPortalCustomDomainsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new ApiPortalCustomDomainResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Handle requests to list all API portal custom domains. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains + /// Operation Id: ApiPortalCustomDomains_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) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _apiPortalCustomDomainResourceApiPortalCustomDomainsClientDiagnostics.CreateScope("ApiPortalCustomDomainResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _apiPortalCustomDomainResourceApiPortalCustomDomainsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new ApiPortalCustomDomainResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _apiPortalCustomDomainResourceApiPortalCustomDomainsClientDiagnostics.CreateScope("ApiPortalCustomDomainResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _apiPortalCustomDomainResourceApiPortalCustomDomainsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new ApiPortalCustomDomainResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains/{domainName} + /// Operation Id: ApiPortalCustomDomains_Get + /// + /// The name of the API portal custom domain. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var scope = _apiPortalCustomDomainResourceApiPortalCustomDomainsClientDiagnostics.CreateScope("ApiPortalCustomDomainResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _apiPortalCustomDomainResourceApiPortalCustomDomainsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, 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}/apiPortals/{apiPortalName}/domains/{domainName} + /// Operation Id: ApiPortalCustomDomains_Get + /// + /// The name of the API portal custom domain. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var scope = _apiPortalCustomDomainResourceApiPortalCustomDomainsClientDiagnostics.CreateScope("ApiPortalCustomDomainResourceCollection.Exists"); + scope.Start(); + try + { + var response = _apiPortalCustomDomainResourceApiPortalCustomDomainsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, 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/ApiPortalCustomDomainResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalCustomDomainResourceData.cs new file mode 100644 index 0000000000000..25b915245392f --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalCustomDomainResourceData.cs @@ -0,0 +1,47 @@ +// 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 ApiPortalCustomDomainResource data model. + public partial class ApiPortalCustomDomainResourceData : ResourceData + { + /// Initializes a new instance of ApiPortalCustomDomainResourceData. + public ApiPortalCustomDomainResourceData() + { + } + + /// Initializes a new instance of ApiPortalCustomDomainResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The properties of custom domain for API portal. + internal ApiPortalCustomDomainResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ApiPortalCustomDomainProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// The properties of custom domain for API portal. + internal ApiPortalCustomDomainProperties Properties { get; set; } + /// The thumbprint of bound certificate. + public string ApiPortalCustomDomainThumbprint + { + get => Properties is null ? default : Properties.Thumbprint; + set + { + if (Properties is null) + Properties = new ApiPortalCustomDomainProperties(); + Properties.Thumbprint = value; + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalResource.cs new file mode 100644 index 0000000000000..9e1e4540ab2d4 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalResource.cs @@ -0,0 +1,339 @@ +// 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 an ApiPortalResource 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 GetApiPortalResource method. + /// Otherwise you can get one from its parent resource using the GetApiPortalResource method. + /// + public partial class ApiPortalResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string apiPortalName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _apiPortalResourceApiPortalsClientDiagnostics; + private readonly ApiPortalsRestOperations _apiPortalResourceApiPortalsRestClient; + private readonly ApiPortalResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected ApiPortalResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ApiPortalResource(ArmClient client, ApiPortalResourceData 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 ApiPortalResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _apiPortalResourceApiPortalsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string apiPortalResourceApiPortalsApiVersion); + _apiPortalResourceApiPortalsRestClient = new ApiPortalsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, apiPortalResourceApiPortalsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/apiPortals"; + + /// 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 ApiPortalResourceData 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 ApiPortalCustomDomainResources in the ApiPortalResource. + /// An object representing collection of ApiPortalCustomDomainResources and their operations over a ApiPortalCustomDomainResource. + public virtual ApiPortalCustomDomainResourceCollection GetApiPortalCustomDomainResources() + { + return GetCachedClient(Client => new ApiPortalCustomDomainResourceCollection(Client, Id)); + } + + /// + /// Get the API portal custom domain. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains/{domainName} + /// Operation Id: ApiPortalCustomDomains_Get + /// + /// The name of the API portal custom domain. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetApiPortalCustomDomainResourceAsync(string domainName, CancellationToken cancellationToken = default) + { + return await GetApiPortalCustomDomainResources().GetAsync(domainName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the API portal custom domain. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains/{domainName} + /// Operation Id: ApiPortalCustomDomains_Get + /// + /// The name of the API portal custom domain. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetApiPortalCustomDomainResource(string domainName, CancellationToken cancellationToken = default) + { + return GetApiPortalCustomDomainResources().Get(domainName, cancellationToken); + } + + /// + /// Get the API portal and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName} + /// Operation Id: ApiPortals_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _apiPortalResourceApiPortalsClientDiagnostics.CreateScope("ApiPortalResource.Get"); + scope.Start(); + try + { + var response = await _apiPortalResourceApiPortalsRestClient.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 ApiPortalResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the API portal and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName} + /// Operation Id: ApiPortals_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _apiPortalResourceApiPortalsClientDiagnostics.CreateScope("ApiPortalResource.Get"); + scope.Start(); + try + { + var response = _apiPortalResourceApiPortalsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ApiPortalResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the default API portal. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName} + /// Operation Id: ApiPortals_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 = _apiPortalResourceApiPortalsClientDiagnostics.CreateScope("ApiPortalResource.Delete"); + scope.Start(); + try + { + var response = await _apiPortalResourceApiPortalsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_apiPortalResourceApiPortalsClientDiagnostics, Pipeline, _apiPortalResourceApiPortalsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the default API portal. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName} + /// Operation Id: ApiPortals_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 = _apiPortalResourceApiPortalsClientDiagnostics.CreateScope("ApiPortalResource.Delete"); + scope.Start(); + try + { + var response = _apiPortalResourceApiPortalsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_apiPortalResourceApiPortalsClientDiagnostics, Pipeline, _apiPortalResourceApiPortalsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create the default API portal or update the existing API portal. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName} + /// Operation Id: ApiPortals_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 API portal for the create or update operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ApiPortalResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _apiPortalResourceApiPortalsClientDiagnostics.CreateScope("ApiPortalResource.Update"); + scope.Start(); + try + { + var response = await _apiPortalResourceApiPortalsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new ApiPortalResourceOperationSource(Client), _apiPortalResourceApiPortalsClientDiagnostics, Pipeline, _apiPortalResourceApiPortalsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create the default API portal or update the existing API portal. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName} + /// Operation Id: ApiPortals_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 API portal for the create or update operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ApiPortalResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _apiPortalResourceApiPortalsClientDiagnostics.CreateScope("ApiPortalResource.Update"); + scope.Start(); + try + { + var response = _apiPortalResourceApiPortalsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new ApiPortalResourceOperationSource(Client), _apiPortalResourceApiPortalsClientDiagnostics, Pipeline, _apiPortalResourceApiPortalsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Check the domains are valid as well as not in use. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/validateDomain + /// Operation Id: ApiPortals_ValidateDomain + /// + /// Custom domain payload to be validated. + /// The cancellation token to use. + /// is null. + public virtual async Task> ValidateDomainAsync(CustomDomainValidatePayload validatePayload, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(validatePayload, nameof(validatePayload)); + + using var scope = _apiPortalResourceApiPortalsClientDiagnostics.CreateScope("ApiPortalResource.ValidateDomain"); + scope.Start(); + try + { + var response = await _apiPortalResourceApiPortalsRestClient.ValidateDomainAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, validatePayload, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Check the domains are valid as well as not in use. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/validateDomain + /// Operation Id: ApiPortals_ValidateDomain + /// + /// Custom domain payload to be validated. + /// The cancellation token to use. + /// is null. + public virtual Response ValidateDomain(CustomDomainValidatePayload validatePayload, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(validatePayload, nameof(validatePayload)); + + using var scope = _apiPortalResourceApiPortalsClientDiagnostics.CreateScope("ApiPortalResource.ValidateDomain"); + scope.Start(); + try + { + var response = _apiPortalResourceApiPortalsRestClient.ValidateDomain(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, validatePayload, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalResourceCollection.cs new file mode 100644 index 0000000000000..24de5a3e25f48 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalResourceCollection.cs @@ -0,0 +1,333 @@ +// 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.Linq; +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 GetApiPortalResources method from an instance of . + /// + public partial class ApiPortalResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _apiPortalResourceApiPortalsClientDiagnostics; + private readonly ApiPortalsRestOperations _apiPortalResourceApiPortalsRestClient; + + /// Initializes a new instance of the class for mocking. + protected ApiPortalResourceCollection() + { + } + + /// 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 ApiPortalResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _apiPortalResourceApiPortalsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ApiPortalResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ApiPortalResource.ResourceType, out string apiPortalResourceApiPortalsApiVersion); + _apiPortalResourceApiPortalsRestClient = new ApiPortalsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, apiPortalResourceApiPortalsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ServiceResource.ResourceType), nameof(id)); + } + + /// + /// Create the default API portal or update the existing API portal. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName} + /// Operation Id: ApiPortals_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 API portal. + /// The API portal 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 apiPortalName, ApiPortalResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(apiPortalName, nameof(apiPortalName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _apiPortalResourceApiPortalsClientDiagnostics.CreateScope("ApiPortalResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _apiPortalResourceApiPortalsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, apiPortalName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new ApiPortalResourceOperationSource(Client), _apiPortalResourceApiPortalsClientDiagnostics, Pipeline, _apiPortalResourceApiPortalsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, apiPortalName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create the default API portal or update the existing API portal. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName} + /// Operation Id: ApiPortals_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 API portal. + /// The API portal 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 apiPortalName, ApiPortalResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(apiPortalName, nameof(apiPortalName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _apiPortalResourceApiPortalsClientDiagnostics.CreateScope("ApiPortalResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _apiPortalResourceApiPortalsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, apiPortalName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new ApiPortalResourceOperationSource(Client), _apiPortalResourceApiPortalsClientDiagnostics, Pipeline, _apiPortalResourceApiPortalsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, apiPortalName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the API portal and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName} + /// Operation Id: ApiPortals_Get + /// + /// The name of API 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 apiPortalName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(apiPortalName, nameof(apiPortalName)); + + using var scope = _apiPortalResourceApiPortalsClientDiagnostics.CreateScope("ApiPortalResourceCollection.Get"); + scope.Start(); + try + { + var response = await _apiPortalResourceApiPortalsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, apiPortalName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ApiPortalResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the API portal and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName} + /// Operation Id: ApiPortals_Get + /// + /// The name of API portal. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string apiPortalName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(apiPortalName, nameof(apiPortalName)); + + using var scope = _apiPortalResourceApiPortalsClientDiagnostics.CreateScope("ApiPortalResourceCollection.Get"); + scope.Start(); + try + { + var response = _apiPortalResourceApiPortalsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, apiPortalName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ApiPortalResource(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}/apiPortals + /// Operation Id: ApiPortals_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) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _apiPortalResourceApiPortalsClientDiagnostics.CreateScope("ApiPortalResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _apiPortalResourceApiPortalsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new ApiPortalResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _apiPortalResourceApiPortalsClientDiagnostics.CreateScope("ApiPortalResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _apiPortalResourceApiPortalsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new ApiPortalResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Handles requests to list all resources in a Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals + /// Operation Id: ApiPortals_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) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _apiPortalResourceApiPortalsClientDiagnostics.CreateScope("ApiPortalResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _apiPortalResourceApiPortalsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new ApiPortalResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _apiPortalResourceApiPortalsClientDiagnostics.CreateScope("ApiPortalResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _apiPortalResourceApiPortalsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new ApiPortalResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName} + /// Operation Id: ApiPortals_Get + /// + /// The name of API 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 apiPortalName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(apiPortalName, nameof(apiPortalName)); + + using var scope = _apiPortalResourceApiPortalsClientDiagnostics.CreateScope("ApiPortalResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _apiPortalResourceApiPortalsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, apiPortalName, 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}/apiPortals/{apiPortalName} + /// Operation Id: ApiPortals_Get + /// + /// The name of API portal. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string apiPortalName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(apiPortalName, nameof(apiPortalName)); + + using var scope = _apiPortalResourceApiPortalsClientDiagnostics.CreateScope("ApiPortalResourceCollection.Exists"); + scope.Start(); + try + { + var response = _apiPortalResourceApiPortalsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, apiPortalName, 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/ApiPortalResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalResourceData.cs new file mode 100644 index 0000000000000..07c761131170c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalResourceData.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class representing the ApiPortalResource data model. + public partial class ApiPortalResourceData : ResourceData + { + /// Initializes a new instance of ApiPortalResourceData. + public ApiPortalResourceData() + { + } + + /// Initializes a new instance of ApiPortalResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// API portal properties payload. + /// Sku of the API portal resource. + internal ApiPortalResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ApiPortalProperties properties, AppPlatformSku sku) : base(id, name, resourceType, systemData) + { + Properties = properties; + Sku = sku; + } + + /// API portal properties payload. + public ApiPortalProperties Properties { get; set; } + /// Sku of the API portal resource. + public AppPlatformSku Sku { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppResource.cs new file mode 100644 index 0000000000000..ab6be3583a66a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppResource.cs @@ -0,0 +1,519 @@ +// 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 an AppResource 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 GetAppResource method. + /// Otherwise you can get one from its parent resource using the GetAppResource method. + /// + public partial class AppResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string appName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _appResourceAppsClientDiagnostics; + private readonly AppsRestOperations _appResourceAppsRestClient; + private readonly AppResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected AppResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal AppResource(ArmClient client, AppResourceData 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 AppResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _appResourceAppsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string appResourceAppsApiVersion); + _appResourceAppsRestClient = new AppsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appResourceAppsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/apps"; + + /// 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 AppResourceData 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 BindingResources in the AppResource. + /// An object representing collection of BindingResources and their operations over a BindingResource. + public virtual BindingResourceCollection GetBindingResources() + { + return GetCachedClient(Client => new BindingResourceCollection(Client, Id)); + } + + /// + /// Get a Binding and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName} + /// Operation Id: Bindings_Get + /// + /// The name of the Binding resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetBindingResourceAsync(string bindingName, CancellationToken cancellationToken = default) + { + return await GetBindingResources().GetAsync(bindingName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Binding and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName} + /// Operation Id: Bindings_Get + /// + /// The name of the Binding resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetBindingResource(string bindingName, CancellationToken cancellationToken = default) + { + return GetBindingResources().Get(bindingName, cancellationToken); + } + + /// Gets a collection of CustomDomainResources in the AppResource. + /// An object representing collection of CustomDomainResources and their operations over a CustomDomainResource. + public virtual CustomDomainResourceCollection GetCustomDomainResources() + { + return GetCachedClient(Client => new CustomDomainResourceCollection(Client, Id)); + } + + /// + /// Get the custom domain of one lifecycle application. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName} + /// Operation Id: CustomDomains_Get + /// + /// The name of the custom domain resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetCustomDomainResourceAsync(string domainName, CancellationToken cancellationToken = default) + { + return await GetCustomDomainResources().GetAsync(domainName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the custom domain of one lifecycle application. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName} + /// Operation Id: CustomDomains_Get + /// + /// The name of the custom domain resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetCustomDomainResource(string domainName, CancellationToken cancellationToken = default) + { + return GetCustomDomainResources().Get(domainName, cancellationToken); + } + + /// Gets a collection of DeploymentResources in the AppResource. + /// An object representing collection of DeploymentResources and their operations over a DeploymentResource. + public virtual DeploymentResourceCollection GetDeploymentResources() + { + return GetCachedClient(Client => new DeploymentResourceCollection(Client, Id)); + } + + /// + /// Get a Deployment and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName} + /// Operation Id: Deployments_Get + /// + /// The name of the Deployment resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetDeploymentResourceAsync(string deploymentName, CancellationToken cancellationToken = default) + { + return await GetDeploymentResources().GetAsync(deploymentName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Deployment and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName} + /// Operation Id: Deployments_Get + /// + /// The name of the Deployment resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetDeploymentResource(string deploymentName, CancellationToken cancellationToken = default) + { + return GetDeploymentResources().Get(deploymentName, cancellationToken); + } + + /// + /// Get an App and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName} + /// Operation Id: Apps_Get + /// + /// Indicates whether sync status. + /// The cancellation token to use. + public virtual async Task> GetAsync(string syncStatus = null, CancellationToken cancellationToken = default) + { + using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResource.Get"); + scope.Start(); + try + { + var response = await _appResourceAppsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, syncStatus, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AppResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get an App and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName} + /// Operation Id: Apps_Get + /// + /// Indicates whether sync status. + /// The cancellation token to use. + public virtual Response Get(string syncStatus = null, CancellationToken cancellationToken = default) + { + using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResource.Get"); + scope.Start(); + try + { + var response = _appResourceAppsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, syncStatus, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AppResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Operation to delete an App. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName} + /// Operation Id: Apps_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 = _appResourceAppsClientDiagnostics.CreateScope("AppResource.Delete"); + scope.Start(); + try + { + var response = await _appResourceAppsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_appResourceAppsClientDiagnostics, Pipeline, _appResourceAppsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Operation to delete an App. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName} + /// Operation Id: Apps_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 = _appResourceAppsClientDiagnostics.CreateScope("AppResource.Delete"); + scope.Start(); + try + { + var response = _appResourceAppsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_appResourceAppsClientDiagnostics, Pipeline, _appResourceAppsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Operation to update an exiting App. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName} + /// Operation Id: Apps_Update + /// + /// 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, AppResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResource.Update"); + scope.Start(); + try + { + var response = await _appResourceAppsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new AppResourceOperationSource(Client), _appResourceAppsClientDiagnostics, Pipeline, _appResourceAppsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Operation to update an exiting App. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName} + /// Operation Id: Apps_Update + /// + /// 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, AppResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResource.Update"); + scope.Start(); + try + { + var response = _appResourceAppsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new AppResourceOperationSource(Client), _appResourceAppsClientDiagnostics, Pipeline, _appResourceAppsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get an resource upload URL for an App, which may be artifacts or source archive. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/getResourceUploadUrl + /// Operation Id: Apps_GetResourceUploadUrl + /// + /// The cancellation token to use. + public virtual async Task> GetResourceUploadUrlAsync(CancellationToken cancellationToken = default) + { + using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResource.GetResourceUploadUrl"); + scope.Start(); + try + { + var response = await _appResourceAppsRestClient.GetResourceUploadUrlAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get an resource upload URL for an App, which may be artifacts or source archive. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/getResourceUploadUrl + /// Operation Id: Apps_GetResourceUploadUrl + /// + /// The cancellation token to use. + public virtual Response GetResourceUploadUrl(CancellationToken cancellationToken = default) + { + using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResource.GetResourceUploadUrl"); + scope.Start(); + try + { + var response = _appResourceAppsRestClient.GetResourceUploadUrl(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Set existing Deployment under the app as active + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/setActiveDeployments + /// Operation Id: Apps_SetActiveDeployments + /// + /// 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. + /// A list of Deployment name to be active. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetActiveDeploymentsAsync(WaitUntil waitUntil, ActiveDeploymentCollection activeDeploymentCollection, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(activeDeploymentCollection, nameof(activeDeploymentCollection)); + + using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResource.SetActiveDeployments"); + scope.Start(); + try + { + var response = await _appResourceAppsRestClient.SetActiveDeploymentsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, activeDeploymentCollection, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new AppResourceOperationSource(Client), _appResourceAppsClientDiagnostics, Pipeline, _appResourceAppsRestClient.CreateSetActiveDeploymentsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, activeDeploymentCollection).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Set existing Deployment under the app as active + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/setActiveDeployments + /// Operation Id: Apps_SetActiveDeployments + /// + /// 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. + /// A list of Deployment name to be active. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation SetActiveDeployments(WaitUntil waitUntil, ActiveDeploymentCollection activeDeploymentCollection, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(activeDeploymentCollection, nameof(activeDeploymentCollection)); + + using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResource.SetActiveDeployments"); + scope.Start(); + try + { + var response = _appResourceAppsRestClient.SetActiveDeployments(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, activeDeploymentCollection, cancellationToken); + var operation = new AppPlatformArmOperation(new AppResourceOperationSource(Client), _appResourceAppsClientDiagnostics, Pipeline, _appResourceAppsRestClient.CreateSetActiveDeploymentsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, activeDeploymentCollection).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Check the resource name is valid as well as not in use. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/validateDomain + /// Operation Id: Apps_ValidateDomain + /// + /// Custom domain payload to be validated. + /// The cancellation token to use. + /// is null. + public virtual async Task> ValidateDomainAsync(CustomDomainValidatePayload validatePayload, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(validatePayload, nameof(validatePayload)); + + using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResource.ValidateDomain"); + scope.Start(); + try + { + var response = await _appResourceAppsRestClient.ValidateDomainAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, validatePayload, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Check the resource name is valid as well as not in use. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/validateDomain + /// Operation Id: Apps_ValidateDomain + /// + /// Custom domain payload to be validated. + /// The cancellation token to use. + /// is null. + public virtual Response ValidateDomain(CustomDomainValidatePayload validatePayload, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(validatePayload, nameof(validatePayload)); + + using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResource.ValidateDomain"); + scope.Start(); + try + { + var response = _appResourceAppsRestClient.ValidateDomain(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, validatePayload, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppResourceCollection.cs new file mode 100644 index 0000000000000..ff10de98d06ce --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppResourceCollection.cs @@ -0,0 +1,337 @@ +// 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.Linq; +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 GetAppResources method from an instance of . + /// + public partial class AppResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _appResourceAppsClientDiagnostics; + private readonly AppsRestOperations _appResourceAppsRestClient; + + /// Initializes a new instance of the class for mocking. + protected AppResourceCollection() + { + } + + /// 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 AppResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _appResourceAppsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", AppResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AppResource.ResourceType, out string appResourceAppsApiVersion); + _appResourceAppsRestClient = new AppsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appResourceAppsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ServiceResource.ResourceType), nameof(id)); + } + + /// + /// Create a new App or update an exiting App. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName} + /// Operation Id: Apps_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 App resource. + /// 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 appName, AppResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _appResourceAppsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new AppResourceOperationSource(Client), _appResourceAppsClientDiagnostics, Pipeline, _appResourceAppsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a new App or update an exiting App. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName} + /// Operation Id: Apps_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 App resource. + /// 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 appName, AppResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _appResourceAppsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new AppResourceOperationSource(Client), _appResourceAppsClientDiagnostics, Pipeline, _appResourceAppsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get an App and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName} + /// Operation Id: Apps_Get + /// + /// The name of the App resource. + /// Indicates whether sync status. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string appName, string syncStatus = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + + using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResourceCollection.Get"); + scope.Start(); + try + { + var response = await _appResourceAppsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appName, syncStatus, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AppResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get an App and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName} + /// Operation Id: Apps_Get + /// + /// The name of the App resource. + /// Indicates whether sync status. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string appName, string syncStatus = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + + using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResourceCollection.Get"); + scope.Start(); + try + { + var response = _appResourceAppsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appName, syncStatus, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AppResource(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}/apps + /// Operation Id: Apps_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) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _appResourceAppsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new AppResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _appResourceAppsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new AppResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Handles requests to list all resources in a Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps + /// Operation Id: Apps_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) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _appResourceAppsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AppResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _appResourceAppsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AppResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName} + /// Operation Id: Apps_Get + /// + /// The name of the App resource. + /// Indicates whether sync status. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string appName, string syncStatus = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + + using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _appResourceAppsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appName, syncStatus, 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}/apps/{appName} + /// Operation Id: Apps_Get + /// + /// The name of the App resource. + /// Indicates whether sync status. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string appName, string syncStatus = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + + using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResourceCollection.Exists"); + scope.Start(); + try + { + var response = _appResourceAppsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appName, syncStatus, 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/AppResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppResourceData.cs new file mode 100644 index 0000000000000..74adb56884ae9 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppResourceData.cs @@ -0,0 +1,44 @@ +// 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 AppResource data model. + public partial class AppResourceData : ResourceData + { + /// Initializes a new instance of AppResourceData. + public AppResourceData() + { + } + + /// Initializes a new instance of AppResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Properties of the App resource. + /// The Managed Identity type of the app resource. + /// The GEO location of the application, always the same with its parent resource. + internal AppResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AppResourceProperties properties, ManagedServiceIdentity identity, AzureLocation? location) : base(id, name, resourceType, systemData) + { + Properties = properties; + Identity = identity; + Location = location; + } + + /// Properties of the App resource. + public AppResourceProperties Properties { get; set; } + /// The Managed Identity type of the app resource. + public ManagedServiceIdentity Identity { get; set; } + /// The GEO location of the application, always the same with its parent resource. + public AzureLocation? Location { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BindingResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BindingResource.cs new file mode 100644 index 0000000000000..af752f7f50480 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BindingResource.cs @@ -0,0 +1,249 @@ +// 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 BindingResource 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 GetBindingResource method. + /// Otherwise you can get one from its parent resource using the GetBindingResource method. + /// + public partial class BindingResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string appName, string bindingName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _bindingResourceBindingsClientDiagnostics; + private readonly BindingsRestOperations _bindingResourceBindingsRestClient; + private readonly BindingResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected BindingResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal BindingResource(ArmClient client, BindingResourceData 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 BindingResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _bindingResourceBindingsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string bindingResourceBindingsApiVersion); + _bindingResourceBindingsRestClient = new BindingsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, bindingResourceBindingsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/apps/bindings"; + + /// 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 BindingResourceData 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 a Binding and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName} + /// Operation Id: Bindings_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _bindingResourceBindingsClientDiagnostics.CreateScope("BindingResource.Get"); + scope.Start(); + try + { + var response = await _bindingResourceBindingsRestClient.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 BindingResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Binding and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName} + /// Operation Id: Bindings_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _bindingResourceBindingsClientDiagnostics.CreateScope("BindingResource.Get"); + scope.Start(); + try + { + var response = _bindingResourceBindingsRestClient.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 BindingResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Operation to delete a Binding. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName} + /// Operation Id: Bindings_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 = _bindingResourceBindingsClientDiagnostics.CreateScope("BindingResource.Delete"); + scope.Start(); + try + { + var response = await _bindingResourceBindingsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_bindingResourceBindingsClientDiagnostics, Pipeline, _bindingResourceBindingsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Operation to delete a Binding. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName} + /// Operation Id: Bindings_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 = _bindingResourceBindingsClientDiagnostics.CreateScope("BindingResource.Delete"); + scope.Start(); + try + { + var response = _bindingResourceBindingsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_bindingResourceBindingsClientDiagnostics, Pipeline, _bindingResourceBindingsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Operation to update an exiting Binding. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName} + /// Operation Id: Bindings_Update + /// + /// 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, BindingResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _bindingResourceBindingsClientDiagnostics.CreateScope("BindingResource.Update"); + scope.Start(); + try + { + var response = await _bindingResourceBindingsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new BindingResourceOperationSource(Client), _bindingResourceBindingsClientDiagnostics, Pipeline, _bindingResourceBindingsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Operation to update an exiting Binding. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName} + /// Operation Id: Bindings_Update + /// + /// 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, BindingResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _bindingResourceBindingsClientDiagnostics.CreateScope("BindingResource.Update"); + scope.Start(); + try + { + var response = _bindingResourceBindingsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new BindingResourceOperationSource(Client), _bindingResourceBindingsClientDiagnostics, Pipeline, _bindingResourceBindingsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + 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/BindingResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BindingResourceCollection.cs new file mode 100644 index 0000000000000..4373ba0f2e217 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BindingResourceCollection.cs @@ -0,0 +1,333 @@ +// 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.Linq; +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 GetBindingResources method from an instance of . + /// + public partial class BindingResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _bindingResourceBindingsClientDiagnostics; + private readonly BindingsRestOperations _bindingResourceBindingsRestClient; + + /// Initializes a new instance of the class for mocking. + protected BindingResourceCollection() + { + } + + /// 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 BindingResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _bindingResourceBindingsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", BindingResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(BindingResource.ResourceType, out string bindingResourceBindingsApiVersion); + _bindingResourceBindingsRestClient = new BindingsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, bindingResourceBindingsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != AppResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AppResource.ResourceType), nameof(id)); + } + + /// + /// Create a new Binding or update an exiting Binding. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName} + /// Operation Id: Bindings_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 Binding resource. + /// 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 bindingName, BindingResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(bindingName, nameof(bindingName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _bindingResourceBindingsClientDiagnostics.CreateScope("BindingResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _bindingResourceBindingsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, bindingName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new BindingResourceOperationSource(Client), _bindingResourceBindingsClientDiagnostics, Pipeline, _bindingResourceBindingsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, bindingName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a new Binding or update an exiting Binding. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName} + /// Operation Id: Bindings_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 Binding resource. + /// 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 bindingName, BindingResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(bindingName, nameof(bindingName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _bindingResourceBindingsClientDiagnostics.CreateScope("BindingResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _bindingResourceBindingsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, bindingName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new BindingResourceOperationSource(Client), _bindingResourceBindingsClientDiagnostics, Pipeline, _bindingResourceBindingsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, bindingName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Binding and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName} + /// Operation Id: Bindings_Get + /// + /// The name of the Binding resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string bindingName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(bindingName, nameof(bindingName)); + + using var scope = _bindingResourceBindingsClientDiagnostics.CreateScope("BindingResourceCollection.Get"); + scope.Start(); + try + { + var response = await _bindingResourceBindingsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, bindingName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BindingResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Binding and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName} + /// Operation Id: Bindings_Get + /// + /// The name of the Binding resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string bindingName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(bindingName, nameof(bindingName)); + + using var scope = _bindingResourceBindingsClientDiagnostics.CreateScope("BindingResourceCollection.Get"); + scope.Start(); + try + { + var response = _bindingResourceBindingsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, bindingName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BindingResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Handles requests to list all resources in an App. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings + /// Operation Id: Bindings_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) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _bindingResourceBindingsClientDiagnostics.CreateScope("BindingResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _bindingResourceBindingsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new BindingResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _bindingResourceBindingsClientDiagnostics.CreateScope("BindingResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _bindingResourceBindingsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new BindingResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Handles requests to list all resources in an App. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings + /// Operation Id: Bindings_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) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _bindingResourceBindingsClientDiagnostics.CreateScope("BindingResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _bindingResourceBindingsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new BindingResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _bindingResourceBindingsClientDiagnostics.CreateScope("BindingResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _bindingResourceBindingsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new BindingResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName} + /// Operation Id: Bindings_Get + /// + /// The name of the Binding resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string bindingName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(bindingName, nameof(bindingName)); + + using var scope = _bindingResourceBindingsClientDiagnostics.CreateScope("BindingResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _bindingResourceBindingsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, bindingName, 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}/apps/{appName}/bindings/{bindingName} + /// Operation Id: Bindings_Get + /// + /// The name of the Binding resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string bindingName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(bindingName, nameof(bindingName)); + + using var scope = _bindingResourceBindingsClientDiagnostics.CreateScope("BindingResourceCollection.Exists"); + scope.Start(); + try + { + var response = _bindingResourceBindingsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, bindingName, 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/BindingResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BindingResourceData.cs new file mode 100644 index 0000000000000..fe8f9fd9dd11c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BindingResourceData.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class representing the BindingResource data model. + public partial class BindingResourceData : ResourceData + { + /// Initializes a new instance of BindingResourceData. + public BindingResourceData() + { + } + + /// Initializes a new instance of BindingResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Properties of the Binding resource. + internal BindingResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, BindingResourceProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// Properties of the Binding resource. + public BindingResourceProperties Properties { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildCollection.cs new file mode 100644 index 0000000000000..a013e33aa1c1a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildCollection.cs @@ -0,0 +1,333 @@ +// 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.Linq; +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 GetBuilds method from an instance of . + /// + public partial class BuildCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _buildBuildServiceClientDiagnostics; + private readonly BuildServiceRestOperations _buildBuildServiceRestClient; + + /// Initializes a new instance of the class for mocking. + protected BuildCollection() + { + } + + /// 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 BuildCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _buildBuildServiceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", BuildResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(BuildResource.ResourceType, out string buildBuildServiceApiVersion); + _buildBuildServiceRestClient = new BuildServiceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, buildBuildServiceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != BuildServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, BuildServiceResource.ResourceType), nameof(id)); + } + + /// + /// Create or update a KPack build. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName} + /// Operation Id: BuildService_CreateOrUpdateBuild + /// + /// 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 resource. + /// 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 buildName, BuildData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _buildBuildServiceRestClient.CreateOrUpdateBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, buildName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(Response.FromValue(new BuildResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update a KPack build. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName} + /// Operation Id: BuildService_CreateOrUpdateBuild + /// + /// 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 resource. + /// 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 buildName, BuildData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _buildBuildServiceRestClient.CreateOrUpdateBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, buildName, data, cancellationToken); + var operation = new AppPlatformArmOperation(Response.FromValue(new BuildResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a KPack build. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName} + /// Operation Id: BuildService_GetBuild + /// + /// The name of the build resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildCollection.Get"); + scope.Start(); + try + { + var response = await _buildBuildServiceRestClient.GetBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, buildName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a KPack build. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName} + /// Operation Id: BuildService_GetBuild + /// + /// The name of the build resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildCollection.Get"); + scope.Start(); + try + { + var response = _buildBuildServiceRestClient.GetBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, buildName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List KPack builds. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds + /// Operation Id: BuildService_ListBuilds + /// + /// 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) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildCollection.GetAll"); + scope.Start(); + try + { + var response = await _buildBuildServiceRestClient.ListBuildsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new BuildResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildCollection.GetAll"); + scope.Start(); + try + { + var response = await _buildBuildServiceRestClient.ListBuildsNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new BuildResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// List KPack builds. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds + /// Operation Id: BuildService_ListBuilds + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildCollection.GetAll"); + scope.Start(); + try + { + var response = _buildBuildServiceRestClient.ListBuilds(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new BuildResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildCollection.GetAll"); + scope.Start(); + try + { + var response = _buildBuildServiceRestClient.ListBuildsNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new BuildResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName} + /// Operation Id: BuildService_GetBuild + /// + /// The name of the build resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildCollection.Exists"); + scope.Start(); + try + { + var response = await _buildBuildServiceRestClient.GetBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, buildName, 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}/buildServices/{buildServiceName}/builds/{buildName} + /// Operation Id: BuildService_GetBuild + /// + /// The name of the build resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildCollection.Exists"); + scope.Start(); + try + { + var response = _buildBuildServiceRestClient.GetBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, buildName, 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/BuildData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildData.cs new file mode 100644 index 0000000000000..4bbd2a47a421f --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildData.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class representing the Build data model. + public partial class BuildData : ResourceData + { + /// Initializes a new instance of BuildData. + public BuildData() + { + } + + /// Initializes a new instance of BuildData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Properties of the build resource. + internal BuildData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, BuildProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// Properties of the build resource. + public BuildProperties Properties { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildResource.cs new file mode 100644 index 0000000000000..ac1364af5f9e4 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildResource.cs @@ -0,0 +1,234 @@ +// 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 Build 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 GetBuildResource method. + /// Otherwise you can get one from its parent resource using the GetBuild method. + /// + public partial class BuildResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _buildBuildServiceClientDiagnostics; + private readonly BuildServiceRestOperations _buildBuildServiceRestClient; + private readonly BuildData _data; + + /// Initializes a new instance of the class for mocking. + protected BuildResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal BuildResource(ArmClient client, BuildData 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 BuildResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _buildBuildServiceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string buildBuildServiceApiVersion); + _buildBuildServiceRestClient = new BuildServiceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, buildBuildServiceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/buildServices/builds"; + + /// 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 BuildData 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 BuildResultResources in the Build. + /// An object representing collection of BuildResultResources and their operations over a BuildResultResource. + public virtual BuildResultCollection GetBuildResults() + { + return GetCachedClient(Client => new BuildResultCollection(Client, Id)); + } + + /// + /// Get a KPack build result. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}/results/{buildResultName} + /// Operation Id: BuildService_GetBuildResult + /// + /// The name of the build result resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetBuildResultAsync(string buildResultName, CancellationToken cancellationToken = default) + { + return await GetBuildResults().GetAsync(buildResultName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a KPack build result. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}/results/{buildResultName} + /// Operation Id: BuildService_GetBuildResult + /// + /// The name of the build result resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetBuildResult(string buildResultName, CancellationToken cancellationToken = default) + { + return GetBuildResults().Get(buildResultName, cancellationToken); + } + + /// + /// Get a KPack build. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName} + /// Operation Id: BuildService_GetBuild + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildResource.Get"); + scope.Start(); + try + { + var response = await _buildBuildServiceRestClient.GetBuildAsync(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 BuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a KPack build. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName} + /// Operation Id: BuildService_GetBuild + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildResource.Get"); + scope.Start(); + try + { + var response = _buildBuildServiceRestClient.GetBuild(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 BuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update a KPack build. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName} + /// Operation Id: BuildService_CreateOrUpdateBuild + /// + /// 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, BuildData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildResource.Update"); + scope.Start(); + try + { + var response = await _buildBuildServiceRestClient.CreateOrUpdateBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(Response.FromValue(new BuildResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update a KPack build. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName} + /// Operation Id: BuildService_CreateOrUpdateBuild + /// + /// 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, BuildData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildResource.Update"); + scope.Start(); + try + { + var response = _buildBuildServiceRestClient.CreateOrUpdateBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(Response.FromValue(new BuildResource(Client, response), response.GetRawResponse())); + 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/BuildResultCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildResultCollection.cs new file mode 100644 index 0000000000000..76de017be6047 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildResultCollection.cs @@ -0,0 +1,267 @@ +// 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.Linq; +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 GetBuildResults method from an instance of . + /// + public partial class BuildResultCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _buildResultBuildServiceClientDiagnostics; + private readonly BuildServiceRestOperations _buildResultBuildServiceRestClient; + + /// Initializes a new instance of the class for mocking. + protected BuildResultCollection() + { + } + + /// 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 BuildResultCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _buildResultBuildServiceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", BuildResultResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(BuildResultResource.ResourceType, out string buildResultBuildServiceApiVersion); + _buildResultBuildServiceRestClient = new BuildServiceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, buildResultBuildServiceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != BuildResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, BuildResource.ResourceType), nameof(id)); + } + + /// + /// Get a KPack build result. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}/results/{buildResultName} + /// Operation Id: BuildService_GetBuildResult + /// + /// The name of the build result resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string buildResultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildResultName, nameof(buildResultName)); + + using var scope = _buildResultBuildServiceClientDiagnostics.CreateScope("BuildResultCollection.Get"); + scope.Start(); + try + { + var response = await _buildResultBuildServiceRestClient.GetBuildResultAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildResultName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BuildResultResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a KPack build result. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}/results/{buildResultName} + /// Operation Id: BuildService_GetBuildResult + /// + /// The name of the build result resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string buildResultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildResultName, nameof(buildResultName)); + + using var scope = _buildResultBuildServiceClientDiagnostics.CreateScope("BuildResultCollection.Get"); + scope.Start(); + try + { + var response = _buildResultBuildServiceRestClient.GetBuildResult(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildResultName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BuildResultResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List KPack build results. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}/results + /// Operation Id: BuildService_ListBuildResults + /// + /// 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) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _buildResultBuildServiceClientDiagnostics.CreateScope("BuildResultCollection.GetAll"); + scope.Start(); + try + { + var response = await _buildResultBuildServiceRestClient.ListBuildResultsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new BuildResultResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _buildResultBuildServiceClientDiagnostics.CreateScope("BuildResultCollection.GetAll"); + scope.Start(); + try + { + var response = await _buildResultBuildServiceRestClient.ListBuildResultsNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new BuildResultResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// List KPack build results. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}/results + /// Operation Id: BuildService_ListBuildResults + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _buildResultBuildServiceClientDiagnostics.CreateScope("BuildResultCollection.GetAll"); + scope.Start(); + try + { + var response = _buildResultBuildServiceRestClient.ListBuildResults(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new BuildResultResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _buildResultBuildServiceClientDiagnostics.CreateScope("BuildResultCollection.GetAll"); + scope.Start(); + try + { + var response = _buildResultBuildServiceRestClient.ListBuildResultsNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new BuildResultResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}/results/{buildResultName} + /// Operation Id: BuildService_GetBuildResult + /// + /// The name of the build result resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string buildResultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildResultName, nameof(buildResultName)); + + using var scope = _buildResultBuildServiceClientDiagnostics.CreateScope("BuildResultCollection.Exists"); + scope.Start(); + try + { + var response = await _buildResultBuildServiceRestClient.GetBuildResultAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildResultName, 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}/buildServices/{buildServiceName}/builds/{buildName}/results/{buildResultName} + /// Operation Id: BuildService_GetBuildResult + /// + /// The name of the build result resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string buildResultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildResultName, nameof(buildResultName)); + + using var scope = _buildResultBuildServiceClientDiagnostics.CreateScope("BuildResultCollection.Exists"); + scope.Start(); + try + { + var response = _buildResultBuildServiceRestClient.GetBuildResult(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildResultName, 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/BuildResultData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildResultData.cs new file mode 100644 index 0000000000000..61414053e0f37 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildResultData.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class representing the BuildResult data model. + public partial class BuildResultData : ResourceData + { + /// Initializes a new instance of BuildResultData. + public BuildResultData() + { + } + + /// Initializes a new instance of BuildResultData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Properties of the build result resource. + internal BuildResultData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, BuildResultProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// Properties of the build result resource. + public BuildResultProperties Properties { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildResultResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildResultResource.cs new file mode 100644 index 0000000000000..7fb679ebc7216 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildResultResource.cs @@ -0,0 +1,182 @@ +// 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 BuildResult 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 GetBuildResultResource method. + /// Otherwise you can get one from its parent resource using the GetBuildResult method. + /// + public partial class BuildResultResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, string buildResultName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}/results/{buildResultName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _buildResultBuildServiceClientDiagnostics; + private readonly BuildServiceRestOperations _buildResultBuildServiceRestClient; + private readonly BuildResultData _data; + + /// Initializes a new instance of the class for mocking. + protected BuildResultResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal BuildResultResource(ArmClient client, BuildResultData 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 BuildResultResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _buildResultBuildServiceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string buildResultBuildServiceApiVersion); + _buildResultBuildServiceRestClient = new BuildServiceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, buildResultBuildServiceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/buildServices/builds/results"; + + /// 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 BuildResultData 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 a KPack build result. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}/results/{buildResultName} + /// Operation Id: BuildService_GetBuildResult + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _buildResultBuildServiceClientDiagnostics.CreateScope("BuildResultResource.Get"); + scope.Start(); + try + { + var response = await _buildResultBuildServiceRestClient.GetBuildResultAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, 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 BuildResultResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a KPack build result. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}/results/{buildResultName} + /// Operation Id: BuildService_GetBuildResult + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _buildResultBuildServiceClientDiagnostics.CreateScope("BuildResultResource.Get"); + scope.Start(); + try + { + var response = _buildResultBuildServiceRestClient.GetBuildResult(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BuildResultResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a KPack build result log download URL. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}/results/{buildResultName}/getLogFileUrl + /// Operation Id: BuildService_GetBuildResultLog + /// + /// The cancellation token to use. + public virtual async Task> GetBuildResultLogAsync(CancellationToken cancellationToken = default) + { + using var scope = _buildResultBuildServiceClientDiagnostics.CreateScope("BuildResultResource.GetBuildResultLog"); + scope.Start(); + try + { + var response = await _buildResultBuildServiceRestClient.GetBuildResultLogAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a KPack build result log download URL. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}/results/{buildResultName}/getLogFileUrl + /// Operation Id: BuildService_GetBuildResultLog + /// + /// The cancellation token to use. + public virtual Response GetBuildResultLog(CancellationToken cancellationToken = default) + { + using var scope = _buildResultBuildServiceClientDiagnostics.CreateScope("BuildResultResource.GetBuildResultLog"); + scope.Start(); + try + { + var response = _buildResultBuildServiceRestClient.GetBuildResultLog(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceAgentPoolResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceAgentPoolResource.cs new file mode 100644 index 0000000000000..caf5db974fb4d --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceAgentPoolResource.cs @@ -0,0 +1,197 @@ +// 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 BuildServiceAgentPoolResource 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 GetBuildServiceAgentPoolResource method. + /// Otherwise you can get one from its parent resource using the GetBuildServiceAgentPoolResource method. + /// + public partial class BuildServiceAgentPoolResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string agentPoolName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/agentPools/{agentPoolName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics; + private readonly BuildServiceAgentPoolRestOperations _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient; + private readonly BuildServiceAgentPoolResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected BuildServiceAgentPoolResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal BuildServiceAgentPoolResource(ArmClient client, BuildServiceAgentPoolResourceData 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 BuildServiceAgentPoolResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string buildServiceAgentPoolResourceBuildServiceAgentPoolApiVersion); + _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient = new BuildServiceAgentPoolRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, buildServiceAgentPoolResourceBuildServiceAgentPoolApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/buildServices/agentPools"; + + /// 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 BuildServiceAgentPoolResourceData 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 build service agent pool. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/agentPools/{agentPoolName} + /// Operation Id: BuildServiceAgentPool_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResource.Get"); + scope.Start(); + try + { + var response = await _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.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 BuildServiceAgentPoolResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get build service agent pool. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/agentPools/{agentPoolName} + /// Operation Id: BuildServiceAgentPool_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResource.Get"); + scope.Start(); + try + { + var response = _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.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 BuildServiceAgentPoolResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update build service agent pool. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/agentPools/{agentPoolName} + /// Operation Id: BuildServiceAgentPool_UpdatePut + /// + /// 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, BuildServiceAgentPoolResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResource.Update"); + scope.Start(); + try + { + var response = await _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.UpdatePutAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new BuildServiceAgentPoolResourceOperationSource(Client), _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics, Pipeline, _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.CreateUpdatePutRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update build service agent pool. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/agentPools/{agentPoolName} + /// Operation Id: BuildServiceAgentPool_UpdatePut + /// + /// 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, BuildServiceAgentPoolResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResource.Update"); + scope.Start(); + try + { + var response = _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.UpdatePut(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new BuildServiceAgentPoolResourceOperationSource(Client), _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics, Pipeline, _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.CreateUpdatePutRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + 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/BuildServiceAgentPoolResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceAgentPoolResourceCollection.cs new file mode 100644 index 0000000000000..66b97881be5a0 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceAgentPoolResourceCollection.cs @@ -0,0 +1,333 @@ +// 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.Linq; +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 GetBuildServiceAgentPoolResources method from an instance of . + /// + public partial class BuildServiceAgentPoolResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics; + private readonly BuildServiceAgentPoolRestOperations _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient; + + /// Initializes a new instance of the class for mocking. + protected BuildServiceAgentPoolResourceCollection() + { + } + + /// 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 BuildServiceAgentPoolResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", BuildServiceAgentPoolResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(BuildServiceAgentPoolResource.ResourceType, out string buildServiceAgentPoolResourceBuildServiceAgentPoolApiVersion); + _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient = new BuildServiceAgentPoolRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, buildServiceAgentPoolResourceBuildServiceAgentPoolApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != BuildServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, BuildServiceResource.ResourceType), nameof(id)); + } + + /// + /// Create or update build service agent pool. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/agentPools/{agentPoolName} + /// Operation Id: BuildServiceAgentPool_UpdatePut + /// + /// 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 agent pool resource. + /// 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 agentPoolName, BuildServiceAgentPoolResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.UpdatePutAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, agentPoolName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new BuildServiceAgentPoolResourceOperationSource(Client), _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics, Pipeline, _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.CreateUpdatePutRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, agentPoolName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update build service agent pool. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/agentPools/{agentPoolName} + /// Operation Id: BuildServiceAgentPool_UpdatePut + /// + /// 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 agent pool resource. + /// 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 agentPoolName, BuildServiceAgentPoolResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.UpdatePut(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, agentPoolName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new BuildServiceAgentPoolResourceOperationSource(Client), _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics, Pipeline, _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.CreateUpdatePutRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, agentPoolName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get build service agent pool. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/agentPools/{agentPoolName} + /// Operation Id: BuildServiceAgentPool_Get + /// + /// The name of the build service agent pool resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string agentPoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); + + using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResourceCollection.Get"); + scope.Start(); + try + { + var response = await _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, agentPoolName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BuildServiceAgentPoolResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get build service agent pool. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/agentPools/{agentPoolName} + /// Operation Id: BuildServiceAgentPool_Get + /// + /// The name of the build service agent pool resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string agentPoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); + + using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResourceCollection.Get"); + scope.Start(); + try + { + var response = _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, agentPoolName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BuildServiceAgentPoolResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List build service agent pool. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/agentPools + /// Operation Id: BuildServiceAgentPool_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) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new BuildServiceAgentPoolResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new BuildServiceAgentPoolResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// List build service agent pool. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/agentPools + /// Operation Id: BuildServiceAgentPool_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) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new BuildServiceAgentPoolResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new BuildServiceAgentPoolResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/agentPools/{agentPoolName} + /// Operation Id: BuildServiceAgentPool_Get + /// + /// The name of the build service agent pool resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string agentPoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); + + using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, agentPoolName, 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}/buildServices/{buildServiceName}/agentPools/{agentPoolName} + /// Operation Id: BuildServiceAgentPool_Get + /// + /// The name of the build service agent pool resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string agentPoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); + + using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResourceCollection.Exists"); + scope.Start(); + try + { + var response = _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, agentPoolName, 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/BuildServiceAgentPoolResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceAgentPoolResourceData.cs new file mode 100644 index 0000000000000..8310d87789562 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceAgentPoolResourceData.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class representing the BuildServiceAgentPoolResource data model. + public partial class BuildServiceAgentPoolResourceData : ResourceData + { + /// Initializes a new instance of BuildServiceAgentPoolResourceData. + public BuildServiceAgentPoolResourceData() + { + } + + /// Initializes a new instance of BuildServiceAgentPoolResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// build service agent pool properties. + internal BuildServiceAgentPoolResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, BuildServiceAgentPoolProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// build service agent pool properties. + public BuildServiceAgentPoolProperties Properties { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceCollection.cs new file mode 100644 index 0000000000000..3058389dd147a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceCollection.cs @@ -0,0 +1,267 @@ +// 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.Linq; +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 GetBuildServices method from an instance of . + /// + public partial class BuildServiceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _buildServiceClientDiagnostics; + private readonly BuildServiceRestOperations _buildServiceRestClient; + + /// Initializes a new instance of the class for mocking. + protected BuildServiceCollection() + { + } + + /// 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 BuildServiceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _buildServiceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", BuildServiceResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(BuildServiceResource.ResourceType, out string buildServiceApiVersion); + _buildServiceRestClient = new BuildServiceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, buildServiceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ServiceResource.ResourceType), nameof(id)); + } + + /// + /// Get a build service resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName} + /// Operation Id: BuildService_GetBuildService + /// + /// The name of the build service resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string buildServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); + + using var scope = _buildServiceClientDiagnostics.CreateScope("BuildServiceCollection.Get"); + scope.Start(); + try + { + var response = await _buildServiceRestClient.GetBuildServiceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildServiceName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BuildServiceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a build service resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName} + /// Operation Id: BuildService_GetBuildService + /// + /// The name of the build service resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string buildServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); + + using var scope = _buildServiceClientDiagnostics.CreateScope("BuildServiceCollection.Get"); + scope.Start(); + try + { + var response = _buildServiceRestClient.GetBuildService(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildServiceName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BuildServiceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List build services resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices + /// Operation Id: BuildService_ListBuildServices + /// + /// 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) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _buildServiceClientDiagnostics.CreateScope("BuildServiceCollection.GetAll"); + scope.Start(); + try + { + var response = await _buildServiceRestClient.ListBuildServicesAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new BuildServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _buildServiceClientDiagnostics.CreateScope("BuildServiceCollection.GetAll"); + scope.Start(); + try + { + var response = await _buildServiceRestClient.ListBuildServicesNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new BuildServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// List build services resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices + /// Operation Id: BuildService_ListBuildServices + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _buildServiceClientDiagnostics.CreateScope("BuildServiceCollection.GetAll"); + scope.Start(); + try + { + var response = _buildServiceRestClient.ListBuildServices(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new BuildServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _buildServiceClientDiagnostics.CreateScope("BuildServiceCollection.GetAll"); + scope.Start(); + try + { + var response = _buildServiceRestClient.ListBuildServicesNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new BuildServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName} + /// Operation Id: BuildService_GetBuildService + /// + /// The name of the build service resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string buildServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); + + using var scope = _buildServiceClientDiagnostics.CreateScope("BuildServiceCollection.Exists"); + scope.Start(); + try + { + var response = await _buildServiceRestClient.GetBuildServiceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildServiceName, 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}/buildServices/{buildServiceName} + /// Operation Id: BuildService_GetBuildService + /// + /// The name of the build service resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string buildServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); + + using var scope = _buildServiceClientDiagnostics.CreateScope("BuildServiceCollection.Exists"); + scope.Start(); + try + { + var response = _buildServiceRestClient.GetBuildService(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildServiceName, 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/BuildServiceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceData.cs new file mode 100644 index 0000000000000..de82a04601d6b --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceData.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class representing the BuildService data model. + public partial class BuildServiceData : ResourceData + { + /// Initializes a new instance of BuildServiceData. + public BuildServiceData() + { + } + + /// Initializes a new instance of BuildServiceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Properties of the build resource. + internal BuildServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, BuildServiceProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// Properties of the build resource. + public BuildServiceProperties Properties { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceResource.cs new file mode 100644 index 0000000000000..2b42114062327 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceResource.cs @@ -0,0 +1,367 @@ +// 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 BuildService 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 GetBuildServiceResource method. + /// Otherwise you can get one from its parent resource using the GetBuildService method. + /// + public partial class BuildServiceResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _buildServiceClientDiagnostics; + private readonly BuildServiceRestOperations _buildServiceRestClient; + private readonly BuildServiceData _data; + + /// Initializes a new instance of the class for mocking. + protected BuildServiceResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal BuildServiceResource(ArmClient client, BuildServiceData 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 BuildServiceResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _buildServiceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string buildServiceApiVersion); + _buildServiceRestClient = new BuildServiceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, buildServiceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/buildServices"; + + /// 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 BuildServiceData 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 BuildResources in the BuildService. + /// An object representing collection of BuildResources and their operations over a BuildResource. + public virtual BuildCollection GetBuilds() + { + return GetCachedClient(Client => new BuildCollection(Client, Id)); + } + + /// + /// Get a KPack build. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName} + /// Operation Id: BuildService_GetBuild + /// + /// The name of the build resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetBuildAsync(string buildName, CancellationToken cancellationToken = default) + { + return await GetBuilds().GetAsync(buildName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a KPack build. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName} + /// Operation Id: BuildService_GetBuild + /// + /// The name of the build resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetBuild(string buildName, CancellationToken cancellationToken = default) + { + return GetBuilds().Get(buildName, cancellationToken); + } + + /// Gets a collection of SupportedBuildpackResources in the BuildService. + /// An object representing collection of SupportedBuildpackResources and their operations over a SupportedBuildpackResource. + public virtual SupportedBuildpackResourceCollection GetSupportedBuildpackResources() + { + return GetCachedClient(Client => new SupportedBuildpackResourceCollection(Client, Id)); + } + + /// + /// Get the supported buildpack resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedBuildpacks/{buildpackName} + /// Operation Id: BuildService_GetSupportedBuildpack + /// + /// The name of the buildpack resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetSupportedBuildpackResourceAsync(string buildpackName, CancellationToken cancellationToken = default) + { + return await GetSupportedBuildpackResources().GetAsync(buildpackName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the supported buildpack resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedBuildpacks/{buildpackName} + /// Operation Id: BuildService_GetSupportedBuildpack + /// + /// The name of the buildpack resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetSupportedBuildpackResource(string buildpackName, CancellationToken cancellationToken = default) + { + return GetSupportedBuildpackResources().Get(buildpackName, cancellationToken); + } + + /// Gets a collection of SupportedStackResources in the BuildService. + /// An object representing collection of SupportedStackResources and their operations over a SupportedStackResource. + public virtual SupportedStackResourceCollection GetSupportedStackResources() + { + return GetCachedClient(Client => new SupportedStackResourceCollection(Client, Id)); + } + + /// + /// Get the supported stack resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedStacks/{stackName} + /// Operation Id: BuildService_GetSupportedStack + /// + /// The name of the stack resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetSupportedStackResourceAsync(string stackName, CancellationToken cancellationToken = default) + { + return await GetSupportedStackResources().GetAsync(stackName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the supported stack resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedStacks/{stackName} + /// Operation Id: BuildService_GetSupportedStack + /// + /// The name of the stack resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetSupportedStackResource(string stackName, CancellationToken cancellationToken = default) + { + return GetSupportedStackResources().Get(stackName, cancellationToken); + } + + /// Gets a collection of BuilderResources in the BuildService. + /// An object representing collection of BuilderResources and their operations over a BuilderResource. + public virtual BuilderResourceCollection GetBuilderResources() + { + return GetCachedClient(Client => new BuilderResourceCollection(Client, Id)); + } + + /// + /// Get a KPack builder. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName} + /// Operation Id: BuildServiceBuilder_Get + /// + /// The name of the builder resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetBuilderResourceAsync(string builderName, CancellationToken cancellationToken = default) + { + return await GetBuilderResources().GetAsync(builderName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a KPack builder. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName} + /// Operation Id: BuildServiceBuilder_Get + /// + /// The name of the builder resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetBuilderResource(string builderName, CancellationToken cancellationToken = default) + { + return GetBuilderResources().Get(builderName, cancellationToken); + } + + /// Gets a collection of BuildServiceAgentPoolResources in the BuildService. + /// An object representing collection of BuildServiceAgentPoolResources and their operations over a BuildServiceAgentPoolResource. + public virtual BuildServiceAgentPoolResourceCollection GetBuildServiceAgentPoolResources() + { + return GetCachedClient(Client => new BuildServiceAgentPoolResourceCollection(Client, Id)); + } + + /// + /// Get build service agent pool. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/agentPools/{agentPoolName} + /// Operation Id: BuildServiceAgentPool_Get + /// + /// The name of the build service agent pool resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetBuildServiceAgentPoolResourceAsync(string agentPoolName, CancellationToken cancellationToken = default) + { + return await GetBuildServiceAgentPoolResources().GetAsync(agentPoolName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get build service agent pool. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/agentPools/{agentPoolName} + /// Operation Id: BuildServiceAgentPool_Get + /// + /// The name of the build service agent pool resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetBuildServiceAgentPoolResource(string agentPoolName, CancellationToken cancellationToken = default) + { + return GetBuildServiceAgentPoolResources().Get(agentPoolName, cancellationToken); + } + + /// + /// Get a build service resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName} + /// Operation Id: BuildService_GetBuildService + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _buildServiceClientDiagnostics.CreateScope("BuildServiceResource.Get"); + scope.Start(); + try + { + var response = await _buildServiceRestClient.GetBuildServiceAsync(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 BuildServiceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a build service resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName} + /// Operation Id: BuildService_GetBuildService + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _buildServiceClientDiagnostics.CreateScope("BuildServiceResource.Get"); + scope.Start(); + try + { + var response = _buildServiceRestClient.GetBuildService(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BuildServiceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get an resource upload URL for build service, which may be artifacts or source archive. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/getResourceUploadUrl + /// Operation Id: BuildService_GetResourceUploadUrl + /// + /// The cancellation token to use. + public virtual async Task> GetResourceUploadUrlAsync(CancellationToken cancellationToken = default) + { + using var scope = _buildServiceClientDiagnostics.CreateScope("BuildServiceResource.GetResourceUploadUrl"); + scope.Start(); + try + { + var response = await _buildServiceRestClient.GetResourceUploadUrlAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get an resource upload URL for build service, which may be artifacts or source archive. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/getResourceUploadUrl + /// Operation Id: BuildService_GetResourceUploadUrl + /// + /// The cancellation token to use. + public virtual Response GetResourceUploadUrl(CancellationToken cancellationToken = default) + { + using var scope = _buildServiceClientDiagnostics.CreateScope("BuildServiceResource.GetResourceUploadUrl"); + scope.Start(); + try + { + var response = _buildServiceRestClient.GetResourceUploadUrl(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuilderResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuilderResource.cs new file mode 100644 index 0000000000000..04a26b122f5b2 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuilderResource.cs @@ -0,0 +1,286 @@ +// 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 BuilderResource 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 GetBuilderResource method. + /// Otherwise you can get one from its parent resource using the GetBuilderResource method. + /// + public partial class BuilderResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string builderName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _builderResourceBuildServiceBuilderClientDiagnostics; + private readonly BuildServiceBuilderRestOperations _builderResourceBuildServiceBuilderRestClient; + private readonly BuilderResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected BuilderResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal BuilderResource(ArmClient client, BuilderResourceData 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 BuilderResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _builderResourceBuildServiceBuilderClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string builderResourceBuildServiceBuilderApiVersion); + _builderResourceBuildServiceBuilderRestClient = new BuildServiceBuilderRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, builderResourceBuildServiceBuilderApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/buildServices/builders"; + + /// 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 BuilderResourceData 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 BuildpackBindingResources in the BuilderResource. + /// An object representing collection of BuildpackBindingResources and their operations over a BuildpackBindingResource. + public virtual BuildpackBindingResourceCollection GetBuildpackBindingResources() + { + return GetCachedClient(Client => new BuildpackBindingResourceCollection(Client, Id)); + } + + /// + /// Get a buildpack binding by name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/buildpackBindings/{buildpackBindingName} + /// Operation Id: BuildpackBinding_Get + /// + /// The name of the Buildpack Binding Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetBuildpackBindingResourceAsync(string buildpackBindingName, CancellationToken cancellationToken = default) + { + return await GetBuildpackBindingResources().GetAsync(buildpackBindingName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a buildpack binding by name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/buildpackBindings/{buildpackBindingName} + /// Operation Id: BuildpackBinding_Get + /// + /// The name of the Buildpack Binding Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetBuildpackBindingResource(string buildpackBindingName, CancellationToken cancellationToken = default) + { + return GetBuildpackBindingResources().Get(buildpackBindingName, cancellationToken); + } + + /// + /// Get a KPack builder. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName} + /// Operation Id: BuildServiceBuilder_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResource.Get"); + scope.Start(); + try + { + var response = await _builderResourceBuildServiceBuilderRestClient.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 BuilderResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a KPack builder. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName} + /// Operation Id: BuildServiceBuilder_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResource.Get"); + scope.Start(); + try + { + var response = _builderResourceBuildServiceBuilderRestClient.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 BuilderResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a KPack builder. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName} + /// Operation Id: BuildServiceBuilder_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 = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResource.Delete"); + scope.Start(); + try + { + var response = await _builderResourceBuildServiceBuilderRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_builderResourceBuildServiceBuilderClientDiagnostics, Pipeline, _builderResourceBuildServiceBuilderRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a KPack builder. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName} + /// Operation Id: BuildServiceBuilder_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 = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResource.Delete"); + scope.Start(); + try + { + var response = _builderResourceBuildServiceBuilderRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_builderResourceBuildServiceBuilderClientDiagnostics, Pipeline, _builderResourceBuildServiceBuilderRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update a KPack builder. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName} + /// Operation Id: BuildServiceBuilder_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 target builder for the create or update operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, BuilderResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResource.Update"); + scope.Start(); + try + { + var response = await _builderResourceBuildServiceBuilderRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new BuilderResourceOperationSource(Client), _builderResourceBuildServiceBuilderClientDiagnostics, Pipeline, _builderResourceBuildServiceBuilderRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update a KPack builder. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName} + /// Operation Id: BuildServiceBuilder_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 target builder for the create or update operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, BuilderResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResource.Update"); + scope.Start(); + try + { + var response = _builderResourceBuildServiceBuilderRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new BuilderResourceOperationSource(Client), _builderResourceBuildServiceBuilderClientDiagnostics, Pipeline, _builderResourceBuildServiceBuilderRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + 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/BuilderResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuilderResourceCollection.cs new file mode 100644 index 0000000000000..3aa3c5091a8f6 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuilderResourceCollection.cs @@ -0,0 +1,333 @@ +// 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.Linq; +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 GetBuilderResources method from an instance of . + /// + public partial class BuilderResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _builderResourceBuildServiceBuilderClientDiagnostics; + private readonly BuildServiceBuilderRestOperations _builderResourceBuildServiceBuilderRestClient; + + /// Initializes a new instance of the class for mocking. + protected BuilderResourceCollection() + { + } + + /// 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 BuilderResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _builderResourceBuildServiceBuilderClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", BuilderResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(BuilderResource.ResourceType, out string builderResourceBuildServiceBuilderApiVersion); + _builderResourceBuildServiceBuilderRestClient = new BuildServiceBuilderRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, builderResourceBuildServiceBuilderApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != BuildServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, BuildServiceResource.ResourceType), nameof(id)); + } + + /// + /// Create or update a KPack builder. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName} + /// Operation Id: BuildServiceBuilder_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 builder resource. + /// The target builder 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 builderName, BuilderResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _builderResourceBuildServiceBuilderRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, builderName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new BuilderResourceOperationSource(Client), _builderResourceBuildServiceBuilderClientDiagnostics, Pipeline, _builderResourceBuildServiceBuilderRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, builderName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update a KPack builder. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName} + /// Operation Id: BuildServiceBuilder_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 builder resource. + /// The target builder 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 builderName, BuilderResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _builderResourceBuildServiceBuilderRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, builderName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new BuilderResourceOperationSource(Client), _builderResourceBuildServiceBuilderClientDiagnostics, Pipeline, _builderResourceBuildServiceBuilderRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, builderName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a KPack builder. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName} + /// Operation Id: BuildServiceBuilder_Get + /// + /// The name of the builder resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string builderName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + + using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResourceCollection.Get"); + scope.Start(); + try + { + var response = await _builderResourceBuildServiceBuilderRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, builderName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BuilderResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a KPack builder. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName} + /// Operation Id: BuildServiceBuilder_Get + /// + /// The name of the builder resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string builderName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + + using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResourceCollection.Get"); + scope.Start(); + try + { + var response = _builderResourceBuildServiceBuilderRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, builderName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BuilderResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List KPack builders result. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders + /// Operation Id: BuildServiceBuilder_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) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _builderResourceBuildServiceBuilderRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new BuilderResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _builderResourceBuildServiceBuilderRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new BuilderResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// List KPack builders result. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders + /// Operation Id: BuildServiceBuilder_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) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _builderResourceBuildServiceBuilderRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new BuilderResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _builderResourceBuildServiceBuilderRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new BuilderResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName} + /// Operation Id: BuildServiceBuilder_Get + /// + /// The name of the builder resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string builderName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + + using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _builderResourceBuildServiceBuilderRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, builderName, 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}/buildServices/{buildServiceName}/builders/{builderName} + /// Operation Id: BuildServiceBuilder_Get + /// + /// The name of the builder resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string builderName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + + using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResourceCollection.Exists"); + scope.Start(); + try + { + var response = _builderResourceBuildServiceBuilderRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, builderName, 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/BuilderResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuilderResourceData.cs new file mode 100644 index 0000000000000..7c2d99a014c3a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuilderResourceData.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class representing the BuilderResource data model. + public partial class BuilderResourceData : ResourceData + { + /// Initializes a new instance of BuilderResourceData. + public BuilderResourceData() + { + } + + /// Initializes a new instance of BuilderResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Property of the Builder resource. + internal BuilderResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, BuilderProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// Property of the Builder resource. + public BuilderProperties Properties { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildpackBindingResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildpackBindingResource.cs new file mode 100644 index 0000000000000..aac54e159590f --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildpackBindingResource.cs @@ -0,0 +1,249 @@ +// 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 BuildpackBindingResource 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 GetBuildpackBindingResource method. + /// Otherwise you can get one from its parent resource using the GetBuildpackBindingResource method. + /// + public partial class BuildpackBindingResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string builderName, string buildpackBindingName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/buildpackBindings/{buildpackBindingName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _buildpackBindingResourceBuildpackBindingClientDiagnostics; + private readonly BuildpackBindingRestOperations _buildpackBindingResourceBuildpackBindingRestClient; + private readonly BuildpackBindingResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected BuildpackBindingResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal BuildpackBindingResource(ArmClient client, BuildpackBindingResourceData 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 BuildpackBindingResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _buildpackBindingResourceBuildpackBindingClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string buildpackBindingResourceBuildpackBindingApiVersion); + _buildpackBindingResourceBuildpackBindingRestClient = new BuildpackBindingRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, buildpackBindingResourceBuildpackBindingApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/buildServices/builders/buildpackBindings"; + + /// 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 BuildpackBindingResourceData 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 a buildpack binding by name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/buildpackBindings/{buildpackBindingName} + /// Operation Id: BuildpackBinding_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _buildpackBindingResourceBuildpackBindingClientDiagnostics.CreateScope("BuildpackBindingResource.Get"); + scope.Start(); + try + { + var response = await _buildpackBindingResourceBuildpackBindingRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, 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 BuildpackBindingResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a buildpack binding by name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/buildpackBindings/{buildpackBindingName} + /// Operation Id: BuildpackBinding_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _buildpackBindingResourceBuildpackBindingClientDiagnostics.CreateScope("BuildpackBindingResource.Get"); + scope.Start(); + try + { + var response = _buildpackBindingResourceBuildpackBindingRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BuildpackBindingResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Operation to delete a Buildpack Binding + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/buildpackBindings/{buildpackBindingName} + /// Operation Id: BuildpackBinding_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 = _buildpackBindingResourceBuildpackBindingClientDiagnostics.CreateScope("BuildpackBindingResource.Delete"); + scope.Start(); + try + { + var response = await _buildpackBindingResourceBuildpackBindingRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_buildpackBindingResourceBuildpackBindingClientDiagnostics, Pipeline, _buildpackBindingResourceBuildpackBindingRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Operation to delete a Buildpack Binding + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/buildpackBindings/{buildpackBindingName} + /// Operation Id: BuildpackBinding_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 = _buildpackBindingResourceBuildpackBindingClientDiagnostics.CreateScope("BuildpackBindingResource.Delete"); + scope.Start(); + try + { + var response = _buildpackBindingResourceBuildpackBindingRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_buildpackBindingResourceBuildpackBindingClientDiagnostics, Pipeline, _buildpackBindingResourceBuildpackBindingRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update a buildpack binding. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/buildpackBindings/{buildpackBindingName} + /// Operation Id: BuildpackBinding_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 target buildpack binding for the create or update operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, BuildpackBindingResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _buildpackBindingResourceBuildpackBindingClientDiagnostics.CreateScope("BuildpackBindingResource.Update"); + scope.Start(); + try + { + var response = await _buildpackBindingResourceBuildpackBindingRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new BuildpackBindingResourceOperationSource(Client), _buildpackBindingResourceBuildpackBindingClientDiagnostics, Pipeline, _buildpackBindingResourceBuildpackBindingRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update a buildpack binding. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/buildpackBindings/{buildpackBindingName} + /// Operation Id: BuildpackBinding_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 target buildpack binding for the create or update operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, BuildpackBindingResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _buildpackBindingResourceBuildpackBindingClientDiagnostics.CreateScope("BuildpackBindingResource.Update"); + scope.Start(); + try + { + var response = _buildpackBindingResourceBuildpackBindingRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new BuildpackBindingResourceOperationSource(Client), _buildpackBindingResourceBuildpackBindingClientDiagnostics, Pipeline, _buildpackBindingResourceBuildpackBindingRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + 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/BuildpackBindingResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildpackBindingResourceCollection.cs new file mode 100644 index 0000000000000..454c0de8ab073 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildpackBindingResourceCollection.cs @@ -0,0 +1,333 @@ +// 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.Linq; +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 GetBuildpackBindingResources method from an instance of . + /// + public partial class BuildpackBindingResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _buildpackBindingResourceBuildpackBindingClientDiagnostics; + private readonly BuildpackBindingRestOperations _buildpackBindingResourceBuildpackBindingRestClient; + + /// Initializes a new instance of the class for mocking. + protected BuildpackBindingResourceCollection() + { + } + + /// 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 BuildpackBindingResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _buildpackBindingResourceBuildpackBindingClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", BuildpackBindingResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(BuildpackBindingResource.ResourceType, out string buildpackBindingResourceBuildpackBindingApiVersion); + _buildpackBindingResourceBuildpackBindingRestClient = new BuildpackBindingRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, buildpackBindingResourceBuildpackBindingApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != BuilderResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, BuilderResource.ResourceType), nameof(id)); + } + + /// + /// Create or update a buildpack binding. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/buildpackBindings/{buildpackBindingName} + /// Operation Id: BuildpackBinding_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 Buildpack Binding Name. + /// The target buildpack binding 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 buildpackBindingName, BuildpackBindingResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildpackBindingName, nameof(buildpackBindingName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _buildpackBindingResourceBuildpackBindingClientDiagnostics.CreateScope("BuildpackBindingResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _buildpackBindingResourceBuildpackBindingRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildpackBindingName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new BuildpackBindingResourceOperationSource(Client), _buildpackBindingResourceBuildpackBindingClientDiagnostics, Pipeline, _buildpackBindingResourceBuildpackBindingRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildpackBindingName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update a buildpack binding. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/buildpackBindings/{buildpackBindingName} + /// Operation Id: BuildpackBinding_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 Buildpack Binding Name. + /// The target buildpack binding 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 buildpackBindingName, BuildpackBindingResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildpackBindingName, nameof(buildpackBindingName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _buildpackBindingResourceBuildpackBindingClientDiagnostics.CreateScope("BuildpackBindingResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _buildpackBindingResourceBuildpackBindingRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildpackBindingName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new BuildpackBindingResourceOperationSource(Client), _buildpackBindingResourceBuildpackBindingClientDiagnostics, Pipeline, _buildpackBindingResourceBuildpackBindingRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildpackBindingName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a buildpack binding by name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/buildpackBindings/{buildpackBindingName} + /// Operation Id: BuildpackBinding_Get + /// + /// The name of the Buildpack Binding Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string buildpackBindingName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildpackBindingName, nameof(buildpackBindingName)); + + using var scope = _buildpackBindingResourceBuildpackBindingClientDiagnostics.CreateScope("BuildpackBindingResourceCollection.Get"); + scope.Start(); + try + { + var response = await _buildpackBindingResourceBuildpackBindingRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildpackBindingName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BuildpackBindingResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a buildpack binding by name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/buildpackBindings/{buildpackBindingName} + /// Operation Id: BuildpackBinding_Get + /// + /// The name of the Buildpack Binding Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string buildpackBindingName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildpackBindingName, nameof(buildpackBindingName)); + + using var scope = _buildpackBindingResourceBuildpackBindingClientDiagnostics.CreateScope("BuildpackBindingResourceCollection.Get"); + scope.Start(); + try + { + var response = _buildpackBindingResourceBuildpackBindingRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildpackBindingName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BuildpackBindingResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Handles requests to list all buildpack bindings in a builder. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/buildpackBindings + /// Operation Id: BuildpackBinding_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) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _buildpackBindingResourceBuildpackBindingClientDiagnostics.CreateScope("BuildpackBindingResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _buildpackBindingResourceBuildpackBindingRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new BuildpackBindingResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _buildpackBindingResourceBuildpackBindingClientDiagnostics.CreateScope("BuildpackBindingResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _buildpackBindingResourceBuildpackBindingRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new BuildpackBindingResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Handles requests to list all buildpack bindings in a builder. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/buildpackBindings + /// Operation Id: BuildpackBinding_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) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _buildpackBindingResourceBuildpackBindingClientDiagnostics.CreateScope("BuildpackBindingResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _buildpackBindingResourceBuildpackBindingRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new BuildpackBindingResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _buildpackBindingResourceBuildpackBindingClientDiagnostics.CreateScope("BuildpackBindingResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _buildpackBindingResourceBuildpackBindingRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new BuildpackBindingResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/buildpackBindings/{buildpackBindingName} + /// Operation Id: BuildpackBinding_Get + /// + /// The name of the Buildpack Binding Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string buildpackBindingName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildpackBindingName, nameof(buildpackBindingName)); + + using var scope = _buildpackBindingResourceBuildpackBindingClientDiagnostics.CreateScope("BuildpackBindingResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _buildpackBindingResourceBuildpackBindingRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildpackBindingName, 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}/buildServices/{buildServiceName}/builders/{builderName}/buildpackBindings/{buildpackBindingName} + /// Operation Id: BuildpackBinding_Get + /// + /// The name of the Buildpack Binding Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string buildpackBindingName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildpackBindingName, nameof(buildpackBindingName)); + + using var scope = _buildpackBindingResourceBuildpackBindingClientDiagnostics.CreateScope("BuildpackBindingResourceCollection.Exists"); + scope.Start(); + try + { + var response = _buildpackBindingResourceBuildpackBindingRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildpackBindingName, 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/BuildpackBindingResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildpackBindingResourceData.cs new file mode 100644 index 0000000000000..0d40e92781b2f --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildpackBindingResourceData.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class representing the BuildpackBindingResource data model. + public partial class BuildpackBindingResourceData : ResourceData + { + /// Initializes a new instance of BuildpackBindingResourceData. + public BuildpackBindingResourceData() + { + } + + /// Initializes a new instance of BuildpackBindingResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Properties of a buildpack binding. + internal BuildpackBindingResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, BuildpackBindingProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// Properties of a buildpack binding. + public BuildpackBindingProperties Properties { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CertificateResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CertificateResource.cs new file mode 100644 index 0000000000000..ced4d50b357e7 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CertificateResource.cs @@ -0,0 +1,249 @@ +// 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 CertificateResource 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 GetCertificateResource method. + /// Otherwise you can get one from its parent resource using the GetCertificateResource method. + /// + public partial class CertificateResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string certificateName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _certificateResourceCertificatesClientDiagnostics; + private readonly CertificatesRestOperations _certificateResourceCertificatesRestClient; + private readonly CertificateResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected CertificateResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal CertificateResource(ArmClient client, CertificateResourceData 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 CertificateResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _certificateResourceCertificatesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string certificateResourceCertificatesApiVersion); + _certificateResourceCertificatesRestClient = new CertificatesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, certificateResourceCertificatesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/certificates"; + + /// 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 CertificateResourceData 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 certificate resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName} + /// Operation Id: Certificates_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _certificateResourceCertificatesClientDiagnostics.CreateScope("CertificateResource.Get"); + scope.Start(); + try + { + var response = await _certificateResourceCertificatesRestClient.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 CertificateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the certificate resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName} + /// Operation Id: Certificates_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _certificateResourceCertificatesClientDiagnostics.CreateScope("CertificateResource.Get"); + scope.Start(); + try + { + var response = _certificateResourceCertificatesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CertificateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the certificate resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName} + /// Operation Id: Certificates_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 = _certificateResourceCertificatesClientDiagnostics.CreateScope("CertificateResource.Delete"); + scope.Start(); + try + { + var response = await _certificateResourceCertificatesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_certificateResourceCertificatesClientDiagnostics, Pipeline, _certificateResourceCertificatesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the certificate resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName} + /// Operation Id: Certificates_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 = _certificateResourceCertificatesClientDiagnostics.CreateScope("CertificateResource.Delete"); + scope.Start(); + try + { + var response = _certificateResourceCertificatesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_certificateResourceCertificatesClientDiagnostics, Pipeline, _certificateResourceCertificatesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update certificate resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName} + /// Operation Id: Certificates_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, CertificateResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _certificateResourceCertificatesClientDiagnostics.CreateScope("CertificateResource.Update"); + scope.Start(); + try + { + var response = await _certificateResourceCertificatesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new CertificateResourceOperationSource(Client), _certificateResourceCertificatesClientDiagnostics, Pipeline, _certificateResourceCertificatesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update certificate resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName} + /// Operation Id: Certificates_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, CertificateResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _certificateResourceCertificatesClientDiagnostics.CreateScope("CertificateResource.Update"); + scope.Start(); + try + { + var response = _certificateResourceCertificatesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new CertificateResourceOperationSource(Client), _certificateResourceCertificatesClientDiagnostics, Pipeline, _certificateResourceCertificatesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + 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/CertificateResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CertificateResourceCollection.cs new file mode 100644 index 0000000000000..ee4e10edb0b37 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CertificateResourceCollection.cs @@ -0,0 +1,333 @@ +// 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.Linq; +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 GetCertificateResources method from an instance of . + /// + public partial class CertificateResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _certificateResourceCertificatesClientDiagnostics; + private readonly CertificatesRestOperations _certificateResourceCertificatesRestClient; + + /// Initializes a new instance of the class for mocking. + protected CertificateResourceCollection() + { + } + + /// 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 CertificateResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _certificateResourceCertificatesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", CertificateResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(CertificateResource.ResourceType, out string certificateResourceCertificatesApiVersion); + _certificateResourceCertificatesRestClient = new CertificatesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, certificateResourceCertificatesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ServiceResource.ResourceType), nameof(id)); + } + + /// + /// Create or update certificate resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName} + /// Operation Id: Certificates_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 certificate resource. + /// 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 certificateName, CertificateResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(certificateName, nameof(certificateName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _certificateResourceCertificatesClientDiagnostics.CreateScope("CertificateResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _certificateResourceCertificatesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, certificateName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new CertificateResourceOperationSource(Client), _certificateResourceCertificatesClientDiagnostics, Pipeline, _certificateResourceCertificatesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, certificateName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update certificate resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName} + /// Operation Id: Certificates_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 certificate resource. + /// 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 certificateName, CertificateResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(certificateName, nameof(certificateName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _certificateResourceCertificatesClientDiagnostics.CreateScope("CertificateResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _certificateResourceCertificatesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, certificateName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new CertificateResourceOperationSource(Client), _certificateResourceCertificatesClientDiagnostics, Pipeline, _certificateResourceCertificatesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, certificateName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the certificate resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName} + /// Operation Id: Certificates_Get + /// + /// The name of the certificate resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string certificateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(certificateName, nameof(certificateName)); + + using var scope = _certificateResourceCertificatesClientDiagnostics.CreateScope("CertificateResourceCollection.Get"); + scope.Start(); + try + { + var response = await _certificateResourceCertificatesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, certificateName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CertificateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the certificate resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName} + /// Operation Id: Certificates_Get + /// + /// The name of the certificate resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string certificateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(certificateName, nameof(certificateName)); + + using var scope = _certificateResourceCertificatesClientDiagnostics.CreateScope("CertificateResourceCollection.Get"); + scope.Start(); + try + { + var response = _certificateResourceCertificatesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, certificateName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CertificateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List all the certificates of one user. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates + /// Operation Id: Certificates_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) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _certificateResourceCertificatesClientDiagnostics.CreateScope("CertificateResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _certificateResourceCertificatesRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new CertificateResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _certificateResourceCertificatesClientDiagnostics.CreateScope("CertificateResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _certificateResourceCertificatesRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new CertificateResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// List all the certificates of one user. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates + /// Operation Id: Certificates_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) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _certificateResourceCertificatesClientDiagnostics.CreateScope("CertificateResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _certificateResourceCertificatesRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new CertificateResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _certificateResourceCertificatesClientDiagnostics.CreateScope("CertificateResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _certificateResourceCertificatesRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new CertificateResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName} + /// Operation Id: Certificates_Get + /// + /// The name of the certificate resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string certificateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(certificateName, nameof(certificateName)); + + using var scope = _certificateResourceCertificatesClientDiagnostics.CreateScope("CertificateResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _certificateResourceCertificatesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, certificateName, 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}/certificates/{certificateName} + /// Operation Id: Certificates_Get + /// + /// The name of the certificate resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string certificateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(certificateName, nameof(certificateName)); + + using var scope = _certificateResourceCertificatesClientDiagnostics.CreateScope("CertificateResourceCollection.Exists"); + scope.Start(); + try + { + var response = _certificateResourceCertificatesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, certificateName, 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/CertificateResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CertificateResourceData.cs new file mode 100644 index 0000000000000..f5d467be7313b --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CertificateResourceData.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class representing the CertificateResource data model. + public partial class CertificateResourceData : ResourceData + { + /// Initializes a new instance of CertificateResourceData. + public CertificateResourceData() + { + } + + /// Initializes a new instance of CertificateResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Properties of the certificate resource payload. + internal CertificateResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, CertificateProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// Properties of the certificate resource payload. + public CertificateProperties Properties { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigServerResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigServerResource.cs new file mode 100644 index 0000000000000..12a4d58394f39 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigServerResource.cs @@ -0,0 +1,257 @@ +// 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 ConfigServerResource 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 GetConfigServerResource method. + /// Otherwise you can get one from its parent resource using the GetConfigServerResource method. + /// + public partial class ConfigServerResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _configServerResourceConfigServersClientDiagnostics; + private readonly ConfigServersRestOperations _configServerResourceConfigServersRestClient; + private readonly ConfigServerResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected ConfigServerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ConfigServerResource(ArmClient client, ConfigServerResourceData 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 ConfigServerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _configServerResourceConfigServersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string configServerResourceConfigServersApiVersion); + _configServerResourceConfigServersRestClient = new ConfigServersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, configServerResourceConfigServersApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/configServers"; + + /// 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 ConfigServerResourceData 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 config server and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default + /// Operation Id: ConfigServers_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _configServerResourceConfigServersClientDiagnostics.CreateScope("ConfigServerResource.Get"); + scope.Start(); + try + { + var response = await _configServerResourceConfigServersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConfigServerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the config server and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default + /// Operation Id: ConfigServers_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _configServerResourceConfigServersClientDiagnostics.CreateScope("ConfigServerResource.Get"); + scope.Start(); + try + { + var response = _configServerResourceConfigServersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConfigServerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update the config server. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default + /// Operation Id: ConfigServers_UpdatePatch + /// + /// 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, ConfigServerResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _configServerResourceConfigServersClientDiagnostics.CreateScope("ConfigServerResource.Update"); + scope.Start(); + try + { + var response = await _configServerResourceConfigServersRestClient.UpdatePatchAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new ConfigServerResourceOperationSource(Client), _configServerResourceConfigServersClientDiagnostics, Pipeline, _configServerResourceConfigServersRestClient.CreateUpdatePatchRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update the config server. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default + /// Operation Id: ConfigServers_UpdatePatch + /// + /// 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, ConfigServerResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _configServerResourceConfigServersClientDiagnostics.CreateScope("ConfigServerResource.Update"); + scope.Start(); + try + { + var response = _configServerResourceConfigServersRestClient.UpdatePatch(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new ConfigServerResourceOperationSource(Client), _configServerResourceConfigServersClientDiagnostics, Pipeline, _configServerResourceConfigServersRestClient.CreateUpdatePatchRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update the config server. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default + /// Operation Id: ConfigServers_UpdatePut + /// + /// 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> CreateOrUpdateAsync(WaitUntil waitUntil, ConfigServerResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _configServerResourceConfigServersClientDiagnostics.CreateScope("ConfigServerResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _configServerResourceConfigServersRestClient.UpdatePutAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new ConfigServerResourceOperationSource(Client), _configServerResourceConfigServersClientDiagnostics, Pipeline, _configServerResourceConfigServersRestClient.CreateUpdatePutRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update the config server. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default + /// Operation Id: ConfigServers_UpdatePut + /// + /// 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 CreateOrUpdate(WaitUntil waitUntil, ConfigServerResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _configServerResourceConfigServersClientDiagnostics.CreateScope("ConfigServerResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = _configServerResourceConfigServersRestClient.UpdatePut(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new ConfigServerResourceOperationSource(Client), _configServerResourceConfigServersClientDiagnostics, Pipeline, _configServerResourceConfigServersRestClient.CreateUpdatePutRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + 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/ConfigServerResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigServerResourceData.cs new file mode 100644 index 0000000000000..6b316abc57a3d --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigServerResourceData.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class representing the ConfigServerResource data model. + public partial class ConfigServerResourceData : ResourceData + { + /// Initializes a new instance of ConfigServerResourceData. + public ConfigServerResourceData() + { + } + + /// Initializes a new instance of ConfigServerResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Properties of the Config Server resource. + internal ConfigServerResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ConfigServerProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// Properties of the Config Server resource. + public ConfigServerProperties Properties { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigurationServiceResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigurationServiceResource.cs new file mode 100644 index 0000000000000..840ae0be52c88 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigurationServiceResource.cs @@ -0,0 +1,310 @@ +// 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 ConfigurationServiceResource 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 GetConfigurationServiceResource method. + /// Otherwise you can get one from its parent resource using the GetConfigurationServiceResource method. + /// + public partial class ConfigurationServiceResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string configurationServiceName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices/{configurationServiceName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _configurationServiceResourceConfigurationServicesClientDiagnostics; + private readonly ConfigurationServicesRestOperations _configurationServiceResourceConfigurationServicesRestClient; + private readonly ConfigurationServiceResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected ConfigurationServiceResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ConfigurationServiceResource(ArmClient client, ConfigurationServiceResourceData 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 ConfigurationServiceResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _configurationServiceResourceConfigurationServicesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string configurationServiceResourceConfigurationServicesApiVersion); + _configurationServiceResourceConfigurationServicesRestClient = new ConfigurationServicesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, configurationServiceResourceConfigurationServicesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/configurationServices"; + + /// 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 ConfigurationServiceResourceData 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 Configuration Service and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices/{configurationServiceName} + /// Operation Id: ConfigurationServices_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _configurationServiceResourceConfigurationServicesClientDiagnostics.CreateScope("ConfigurationServiceResource.Get"); + scope.Start(); + try + { + var response = await _configurationServiceResourceConfigurationServicesRestClient.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 ConfigurationServiceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Application Configuration Service and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices/{configurationServiceName} + /// Operation Id: ConfigurationServices_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _configurationServiceResourceConfigurationServicesClientDiagnostics.CreateScope("ConfigurationServiceResource.Get"); + scope.Start(); + try + { + var response = _configurationServiceResourceConfigurationServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConfigurationServiceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Disable the default Application Configuration Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices/{configurationServiceName} + /// Operation Id: ConfigurationServices_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 = _configurationServiceResourceConfigurationServicesClientDiagnostics.CreateScope("ConfigurationServiceResource.Delete"); + scope.Start(); + try + { + var response = await _configurationServiceResourceConfigurationServicesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_configurationServiceResourceConfigurationServicesClientDiagnostics, Pipeline, _configurationServiceResourceConfigurationServicesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Disable the default Application Configuration Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices/{configurationServiceName} + /// Operation Id: ConfigurationServices_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 = _configurationServiceResourceConfigurationServicesClientDiagnostics.CreateScope("ConfigurationServiceResource.Delete"); + scope.Start(); + try + { + var response = _configurationServiceResourceConfigurationServicesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_configurationServiceResourceConfigurationServicesClientDiagnostics, Pipeline, _configurationServiceResourceConfigurationServicesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create the default Application Configuration Service or update the existing Application Configuration Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices/{configurationServiceName} + /// Operation Id: ConfigurationServices_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, ConfigurationServiceResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _configurationServiceResourceConfigurationServicesClientDiagnostics.CreateScope("ConfigurationServiceResource.Update"); + scope.Start(); + try + { + var response = await _configurationServiceResourceConfigurationServicesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new ConfigurationServiceResourceOperationSource(Client), _configurationServiceResourceConfigurationServicesClientDiagnostics, Pipeline, _configurationServiceResourceConfigurationServicesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create the default Application Configuration Service or update the existing Application Configuration Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices/{configurationServiceName} + /// Operation Id: ConfigurationServices_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, ConfigurationServiceResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _configurationServiceResourceConfigurationServicesClientDiagnostics.CreateScope("ConfigurationServiceResource.Update"); + scope.Start(); + try + { + var response = _configurationServiceResourceConfigurationServicesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new ConfigurationServiceResourceOperationSource(Client), _configurationServiceResourceConfigurationServicesClientDiagnostics, Pipeline, _configurationServiceResourceConfigurationServicesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Check if the Application Configuration Service settings are valid. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices/{configurationServiceName}/validate + /// Operation Id: ConfigurationServices_Validate + /// + /// 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. + /// Application Configuration Service settings to be validated. + /// The cancellation token to use. + /// is null. + public virtual async Task> ValidateAsync(WaitUntil waitUntil, ConfigurationServiceSettings settings, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(settings, nameof(settings)); + + using var scope = _configurationServiceResourceConfigurationServicesClientDiagnostics.CreateScope("ConfigurationServiceResource.Validate"); + scope.Start(); + try + { + var response = await _configurationServiceResourceConfigurationServicesRestClient.ValidateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, settings, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new ConfigurationServiceSettingsValidateResultOperationSource(), _configurationServiceResourceConfigurationServicesClientDiagnostics, Pipeline, _configurationServiceResourceConfigurationServicesRestClient.CreateValidateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, settings).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Check if the Application Configuration Service settings are valid. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices/{configurationServiceName}/validate + /// Operation Id: ConfigurationServices_Validate + /// + /// 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. + /// Application Configuration Service settings to be validated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Validate(WaitUntil waitUntil, ConfigurationServiceSettings settings, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(settings, nameof(settings)); + + using var scope = _configurationServiceResourceConfigurationServicesClientDiagnostics.CreateScope("ConfigurationServiceResource.Validate"); + scope.Start(); + try + { + var response = _configurationServiceResourceConfigurationServicesRestClient.Validate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, settings, cancellationToken); + var operation = new AppPlatformArmOperation(new ConfigurationServiceSettingsValidateResultOperationSource(), _configurationServiceResourceConfigurationServicesClientDiagnostics, Pipeline, _configurationServiceResourceConfigurationServicesRestClient.CreateValidateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, settings).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/ConfigurationServiceResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigurationServiceResourceCollection.cs new file mode 100644 index 0000000000000..283fe1a278f89 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigurationServiceResourceCollection.cs @@ -0,0 +1,333 @@ +// 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.Linq; +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 GetConfigurationServiceResources method from an instance of . + /// + public partial class ConfigurationServiceResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _configurationServiceResourceConfigurationServicesClientDiagnostics; + private readonly ConfigurationServicesRestOperations _configurationServiceResourceConfigurationServicesRestClient; + + /// Initializes a new instance of the class for mocking. + protected ConfigurationServiceResourceCollection() + { + } + + /// 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 ConfigurationServiceResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _configurationServiceResourceConfigurationServicesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ConfigurationServiceResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ConfigurationServiceResource.ResourceType, out string configurationServiceResourceConfigurationServicesApiVersion); + _configurationServiceResourceConfigurationServicesRestClient = new ConfigurationServicesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, configurationServiceResourceConfigurationServicesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ServiceResource.ResourceType), nameof(id)); + } + + /// + /// Create the default Application Configuration Service or update the existing Application Configuration Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices/{configurationServiceName} + /// Operation Id: ConfigurationServices_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 Configuration Service. + /// 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 configurationServiceName, ConfigurationServiceResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configurationServiceName, nameof(configurationServiceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _configurationServiceResourceConfigurationServicesClientDiagnostics.CreateScope("ConfigurationServiceResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _configurationServiceResourceConfigurationServicesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationServiceName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new ConfigurationServiceResourceOperationSource(Client), _configurationServiceResourceConfigurationServicesClientDiagnostics, Pipeline, _configurationServiceResourceConfigurationServicesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationServiceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create the default Application Configuration Service or update the existing Application Configuration Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices/{configurationServiceName} + /// Operation Id: ConfigurationServices_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 Configuration Service. + /// 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 configurationServiceName, ConfigurationServiceResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configurationServiceName, nameof(configurationServiceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _configurationServiceResourceConfigurationServicesClientDiagnostics.CreateScope("ConfigurationServiceResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _configurationServiceResourceConfigurationServicesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationServiceName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new ConfigurationServiceResourceOperationSource(Client), _configurationServiceResourceConfigurationServicesClientDiagnostics, Pipeline, _configurationServiceResourceConfigurationServicesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationServiceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Application Configuration Service and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices/{configurationServiceName} + /// Operation Id: ConfigurationServices_Get + /// + /// The name of Application Configuration Service. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string configurationServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configurationServiceName, nameof(configurationServiceName)); + + using var scope = _configurationServiceResourceConfigurationServicesClientDiagnostics.CreateScope("ConfigurationServiceResourceCollection.Get"); + scope.Start(); + try + { + var response = await _configurationServiceResourceConfigurationServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationServiceName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConfigurationServiceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Application Configuration Service and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices/{configurationServiceName} + /// Operation Id: ConfigurationServices_Get + /// + /// The name of Application Configuration Service. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string configurationServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configurationServiceName, nameof(configurationServiceName)); + + using var scope = _configurationServiceResourceConfigurationServicesClientDiagnostics.CreateScope("ConfigurationServiceResourceCollection.Get"); + scope.Start(); + try + { + var response = _configurationServiceResourceConfigurationServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationServiceName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConfigurationServiceResource(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}/configurationServices + /// Operation Id: ConfigurationServices_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) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _configurationServiceResourceConfigurationServicesClientDiagnostics.CreateScope("ConfigurationServiceResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _configurationServiceResourceConfigurationServicesRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new ConfigurationServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _configurationServiceResourceConfigurationServicesClientDiagnostics.CreateScope("ConfigurationServiceResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _configurationServiceResourceConfigurationServicesRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new ConfigurationServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Handles requests to list all resources in a Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices + /// Operation Id: ConfigurationServices_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) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _configurationServiceResourceConfigurationServicesClientDiagnostics.CreateScope("ConfigurationServiceResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _configurationServiceResourceConfigurationServicesRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new ConfigurationServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _configurationServiceResourceConfigurationServicesClientDiagnostics.CreateScope("ConfigurationServiceResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _configurationServiceResourceConfigurationServicesRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new ConfigurationServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices/{configurationServiceName} + /// Operation Id: ConfigurationServices_Get + /// + /// The name of Application Configuration Service. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string configurationServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configurationServiceName, nameof(configurationServiceName)); + + using var scope = _configurationServiceResourceConfigurationServicesClientDiagnostics.CreateScope("ConfigurationServiceResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _configurationServiceResourceConfigurationServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationServiceName, 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}/configurationServices/{configurationServiceName} + /// Operation Id: ConfigurationServices_Get + /// + /// The name of Application Configuration Service. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string configurationServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configurationServiceName, nameof(configurationServiceName)); + + using var scope = _configurationServiceResourceConfigurationServicesClientDiagnostics.CreateScope("ConfigurationServiceResourceCollection.Exists"); + scope.Start(); + try + { + var response = _configurationServiceResourceConfigurationServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationServiceName, 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/ConfigurationServiceResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigurationServiceResourceData.cs new file mode 100644 index 0000000000000..268305b64fa8a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigurationServiceResourceData.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class representing the ConfigurationServiceResource data model. + public partial class ConfigurationServiceResourceData : ResourceData + { + /// Initializes a new instance of ConfigurationServiceResourceData. + public ConfigurationServiceResourceData() + { + } + + /// Initializes a new instance of ConfigurationServiceResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Application Configuration Service properties payload. + internal ConfigurationServiceResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ConfigurationServiceProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// Application Configuration Service properties payload. + public ConfigurationServiceProperties Properties { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomDomainResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomDomainResource.cs new file mode 100644 index 0000000000000..a994550f26ff3 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomDomainResource.cs @@ -0,0 +1,249 @@ +// 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 CustomDomainResource 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 GetCustomDomainResource method. + /// Otherwise you can get one from its parent resource using the GetCustomDomainResource method. + /// + public partial class CustomDomainResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string appName, string domainName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _customDomainResourceCustomDomainsClientDiagnostics; + private readonly CustomDomainsRestOperations _customDomainResourceCustomDomainsRestClient; + private readonly CustomDomainResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected CustomDomainResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal CustomDomainResource(ArmClient client, CustomDomainResourceData 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 CustomDomainResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _customDomainResourceCustomDomainsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string customDomainResourceCustomDomainsApiVersion); + _customDomainResourceCustomDomainsRestClient = new CustomDomainsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, customDomainResourceCustomDomainsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/apps/domains"; + + /// 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 CustomDomainResourceData 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 custom domain of one lifecycle application. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName} + /// Operation Id: CustomDomains_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResource.Get"); + scope.Start(); + try + { + var response = await _customDomainResourceCustomDomainsRestClient.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 CustomDomainResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the custom domain of one lifecycle application. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName} + /// Operation Id: CustomDomains_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResource.Get"); + scope.Start(); + try + { + var response = _customDomainResourceCustomDomainsRestClient.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 CustomDomainResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the custom domain of one lifecycle application. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName} + /// Operation Id: CustomDomains_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 = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResource.Delete"); + scope.Start(); + try + { + var response = await _customDomainResourceCustomDomainsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_customDomainResourceCustomDomainsClientDiagnostics, Pipeline, _customDomainResourceCustomDomainsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the custom domain of one lifecycle application. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName} + /// Operation Id: CustomDomains_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 = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResource.Delete"); + scope.Start(); + try + { + var response = _customDomainResourceCustomDomainsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_customDomainResourceCustomDomainsClientDiagnostics, Pipeline, _customDomainResourceCustomDomainsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update custom domain of one lifecycle application. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName} + /// Operation Id: CustomDomains_Update + /// + /// 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, CustomDomainResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResource.Update"); + scope.Start(); + try + { + var response = await _customDomainResourceCustomDomainsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new CustomDomainResourceOperationSource(Client), _customDomainResourceCustomDomainsClientDiagnostics, Pipeline, _customDomainResourceCustomDomainsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update custom domain of one lifecycle application. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName} + /// Operation Id: CustomDomains_Update + /// + /// 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, CustomDomainResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResource.Update"); + scope.Start(); + try + { + var response = _customDomainResourceCustomDomainsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new CustomDomainResourceOperationSource(Client), _customDomainResourceCustomDomainsClientDiagnostics, Pipeline, _customDomainResourceCustomDomainsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + 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/CustomDomainResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomDomainResourceCollection.cs new file mode 100644 index 0000000000000..fb1cfae3ca473 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomDomainResourceCollection.cs @@ -0,0 +1,333 @@ +// 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.Linq; +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 GetCustomDomainResources method from an instance of . + /// + public partial class CustomDomainResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _customDomainResourceCustomDomainsClientDiagnostics; + private readonly CustomDomainsRestOperations _customDomainResourceCustomDomainsRestClient; + + /// Initializes a new instance of the class for mocking. + protected CustomDomainResourceCollection() + { + } + + /// 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 CustomDomainResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _customDomainResourceCustomDomainsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", CustomDomainResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(CustomDomainResource.ResourceType, out string customDomainResourceCustomDomainsApiVersion); + _customDomainResourceCustomDomainsRestClient = new CustomDomainsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, customDomainResourceCustomDomainsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != AppResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AppResource.ResourceType), nameof(id)); + } + + /// + /// Create or update custom domain of one lifecycle application. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName} + /// Operation Id: CustomDomains_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 custom domain resource. + /// 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 domainName, CustomDomainResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _customDomainResourceCustomDomainsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new CustomDomainResourceOperationSource(Client), _customDomainResourceCustomDomainsClientDiagnostics, Pipeline, _customDomainResourceCustomDomainsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update custom domain of one lifecycle application. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName} + /// Operation Id: CustomDomains_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 custom domain resource. + /// 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 domainName, CustomDomainResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _customDomainResourceCustomDomainsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new CustomDomainResourceOperationSource(Client), _customDomainResourceCustomDomainsClientDiagnostics, Pipeline, _customDomainResourceCustomDomainsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the custom domain of one lifecycle application. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName} + /// Operation Id: CustomDomains_Get + /// + /// The name of the custom domain resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResourceCollection.Get"); + scope.Start(); + try + { + var response = await _customDomainResourceCustomDomainsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CustomDomainResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the custom domain of one lifecycle application. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName} + /// Operation Id: CustomDomains_Get + /// + /// The name of the custom domain resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResourceCollection.Get"); + scope.Start(); + try + { + var response = _customDomainResourceCustomDomainsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CustomDomainResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List the custom domains of one lifecycle application. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains + /// Operation Id: CustomDomains_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) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _customDomainResourceCustomDomainsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new CustomDomainResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _customDomainResourceCustomDomainsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new CustomDomainResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// List the custom domains of one lifecycle application. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains + /// Operation Id: CustomDomains_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) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _customDomainResourceCustomDomainsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new CustomDomainResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _customDomainResourceCustomDomainsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new CustomDomainResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName} + /// Operation Id: CustomDomains_Get + /// + /// The name of the custom domain resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _customDomainResourceCustomDomainsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, 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}/apps/{appName}/domains/{domainName} + /// Operation Id: CustomDomains_Get + /// + /// The name of the custom domain resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResourceCollection.Exists"); + scope.Start(); + try + { + var response = _customDomainResourceCustomDomainsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, 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/CustomDomainResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomDomainResourceData.cs new file mode 100644 index 0000000000000..f806895daa6a4 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomDomainResourceData.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class representing the CustomDomainResource data model. + public partial class CustomDomainResourceData : ResourceData + { + /// Initializes a new instance of CustomDomainResourceData. + public CustomDomainResourceData() + { + } + + /// Initializes a new instance of CustomDomainResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Properties of the custom domain resource. + internal CustomDomainResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, CustomDomainProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// Properties of the custom domain resource. + public CustomDomainProperties Properties { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DeploymentResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DeploymentResource.cs new file mode 100644 index 0000000000000..3c1ed61f31511 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DeploymentResource.cs @@ -0,0 +1,630 @@ +// 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 DeploymentResource 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 GetDeploymentResource method. + /// Otherwise you can get one from its parent resource using the GetDeploymentResource method. + /// + public partial class DeploymentResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _deploymentResourceDeploymentsClientDiagnostics; + private readonly DeploymentsRestOperations _deploymentResourceDeploymentsRestClient; + private readonly DeploymentResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected DeploymentResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DeploymentResource(ArmClient client, DeploymentResourceData 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 DeploymentResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _deploymentResourceDeploymentsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string deploymentResourceDeploymentsApiVersion); + _deploymentResourceDeploymentsRestClient = new DeploymentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, deploymentResourceDeploymentsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/apps/deployments"; + + /// 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 DeploymentResourceData 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 a Deployment and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName} + /// Operation Id: Deployments_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.Get"); + scope.Start(); + try + { + var response = await _deploymentResourceDeploymentsRestClient.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 DeploymentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Deployment and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName} + /// Operation Id: Deployments_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.Get"); + scope.Start(); + try + { + var response = _deploymentResourceDeploymentsRestClient.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 DeploymentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Operation to delete a Deployment. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName} + /// Operation Id: Deployments_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 = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.Delete"); + scope.Start(); + try + { + var response = await _deploymentResourceDeploymentsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Operation to delete a Deployment. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName} + /// Operation Id: Deployments_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 = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.Delete"); + scope.Start(); + try + { + var response = _deploymentResourceDeploymentsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Operation to update an exiting Deployment. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName} + /// Operation Id: Deployments_Update + /// + /// 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, DeploymentResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.Update"); + scope.Start(); + try + { + var response = await _deploymentResourceDeploymentsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new DeploymentResourceOperationSource(Client), _deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Operation to update an exiting Deployment. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName} + /// Operation Id: Deployments_Update + /// + /// 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, DeploymentResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.Update"); + scope.Start(); + try + { + var response = _deploymentResourceDeploymentsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new DeploymentResourceOperationSource(Client), _deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Start the deployment. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/start + /// Operation Id: Deployments_Start + /// + /// 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 StartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.Start"); + scope.Start(); + try + { + var response = await _deploymentResourceDeploymentsRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Start the deployment. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/start + /// Operation Id: Deployments_Start + /// + /// 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 Start(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.Start"); + scope.Start(); + try + { + var response = _deploymentResourceDeploymentsRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stop the deployment. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/stop + /// Operation Id: Deployments_Stop + /// + /// 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 StopAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.Stop"); + scope.Start(); + try + { + var response = await _deploymentResourceDeploymentsRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stop the deployment. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/stop + /// Operation Id: Deployments_Stop + /// + /// 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 Stop(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.Stop"); + scope.Start(); + try + { + var response = _deploymentResourceDeploymentsRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Restart the deployment. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/restart + /// Operation Id: Deployments_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 = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.Restart"); + scope.Start(); + try + { + var response = await _deploymentResourceDeploymentsRestClient.RestartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Restart the deployment. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/restart + /// Operation Id: Deployments_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 = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.Restart"); + scope.Start(); + try + { + var response = _deploymentResourceDeploymentsRestClient.Restart(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get deployment log file URL + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/getLogFileUrl + /// Operation Id: Deployments_GetLogFileUrl + /// + /// The cancellation token to use. + public virtual async Task> GetLogFileUrlAsync(CancellationToken cancellationToken = default) + { + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.GetLogFileUrl"); + scope.Start(); + try + { + var response = await _deploymentResourceDeploymentsRestClient.GetLogFileUrlAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get deployment log file URL + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/getLogFileUrl + /// Operation Id: Deployments_GetLogFileUrl + /// + /// The cancellation token to use. + public virtual Response GetLogFileUrl(CancellationToken cancellationToken = default) + { + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.GetLogFileUrl"); + scope.Start(); + try + { + var response = _deploymentResourceDeploymentsRestClient.GetLogFileUrl(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Generate Heap Dump + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/generateHeapDump + /// Operation Id: Deployments_GenerateHeapDump + /// + /// 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 diagnostic operation. + /// The cancellation token to use. + /// is null. + public virtual async Task GenerateHeapDumpAsync(WaitUntil waitUntil, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); + + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.GenerateHeapDump"); + scope.Start(); + try + { + var response = await _deploymentResourceDeploymentsRestClient.GenerateHeapDumpAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateGenerateHeapDumpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Generate Heap Dump + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/generateHeapDump + /// Operation Id: Deployments_GenerateHeapDump + /// + /// 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 diagnostic operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation GenerateHeapDump(WaitUntil waitUntil, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); + + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.GenerateHeapDump"); + scope.Start(); + try + { + var response = _deploymentResourceDeploymentsRestClient.GenerateHeapDump(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken); + var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateGenerateHeapDumpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Generate Thread Dump + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/generateThreadDump + /// Operation Id: Deployments_GenerateThreadDump + /// + /// 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 diagnostic operation. + /// The cancellation token to use. + /// is null. + public virtual async Task GenerateThreadDumpAsync(WaitUntil waitUntil, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); + + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.GenerateThreadDump"); + scope.Start(); + try + { + var response = await _deploymentResourceDeploymentsRestClient.GenerateThreadDumpAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateGenerateThreadDumpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Generate Thread Dump + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/generateThreadDump + /// Operation Id: Deployments_GenerateThreadDump + /// + /// 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 diagnostic operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation GenerateThreadDump(WaitUntil waitUntil, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); + + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.GenerateThreadDump"); + scope.Start(); + try + { + var response = _deploymentResourceDeploymentsRestClient.GenerateThreadDump(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken); + var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateGenerateThreadDumpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Start JFR + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/startJFR + /// Operation Id: Deployments_StartJFR + /// + /// 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 diagnostic operation. + /// The cancellation token to use. + /// is null. + public virtual async Task StartJFRAsync(WaitUntil waitUntil, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); + + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.StartJFR"); + scope.Start(); + try + { + var response = await _deploymentResourceDeploymentsRestClient.StartJFRAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateStartJFRRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Start JFR + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/startJFR + /// Operation Id: Deployments_StartJFR + /// + /// 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 diagnostic operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation StartJFR(WaitUntil waitUntil, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); + + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.StartJFR"); + scope.Start(); + try + { + var response = _deploymentResourceDeploymentsRestClient.StartJFR(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken); + var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateStartJFRRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); + 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/DeploymentResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DeploymentResourceCollection.cs new file mode 100644 index 0000000000000..9b881efd7cffa --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DeploymentResourceCollection.cs @@ -0,0 +1,335 @@ +// 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.Linq; +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 GetDeploymentResources method from an instance of . + /// + public partial class DeploymentResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _deploymentResourceDeploymentsClientDiagnostics; + private readonly DeploymentsRestOperations _deploymentResourceDeploymentsRestClient; + + /// Initializes a new instance of the class for mocking. + protected DeploymentResourceCollection() + { + } + + /// 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 DeploymentResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _deploymentResourceDeploymentsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", DeploymentResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DeploymentResource.ResourceType, out string deploymentResourceDeploymentsApiVersion); + _deploymentResourceDeploymentsRestClient = new DeploymentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, deploymentResourceDeploymentsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != AppResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AppResource.ResourceType), nameof(id)); + } + + /// + /// Create a new Deployment or update an exiting Deployment. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName} + /// Operation Id: Deployments_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 Deployment resource. + /// 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 deploymentName, DeploymentResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _deploymentResourceDeploymentsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new DeploymentResourceOperationSource(Client), _deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a new Deployment or update an exiting Deployment. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName} + /// Operation Id: Deployments_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 Deployment resource. + /// 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 deploymentName, DeploymentResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _deploymentResourceDeploymentsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new DeploymentResourceOperationSource(Client), _deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Deployment and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName} + /// Operation Id: Deployments_Get + /// + /// The name of the Deployment resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResourceCollection.Get"); + scope.Start(); + try + { + var response = await _deploymentResourceDeploymentsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DeploymentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Deployment and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName} + /// Operation Id: Deployments_Get + /// + /// The name of the Deployment resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResourceCollection.Get"); + scope.Start(); + try + { + var response = _deploymentResourceDeploymentsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DeploymentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Handles requests to list all resources in an App. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments + /// Operation Id: Deployments_List + /// + /// Version of the deployments to be listed. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(IEnumerable version = null, CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _deploymentResourceDeploymentsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new DeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _deploymentResourceDeploymentsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new DeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Handles requests to list all resources in an App. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments + /// Operation Id: Deployments_List + /// + /// Version of the deployments to be listed. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(IEnumerable version = null, CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _deploymentResourceDeploymentsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new DeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _deploymentResourceDeploymentsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new DeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName} + /// Operation Id: Deployments_Get + /// + /// The name of the Deployment resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _deploymentResourceDeploymentsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, 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}/apps/{appName}/deployments/{deploymentName} + /// Operation Id: Deployments_Get + /// + /// The name of the Deployment resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResourceCollection.Exists"); + scope.Start(); + try + { + var response = _deploymentResourceDeploymentsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, 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/DeploymentResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DeploymentResourceData.cs new file mode 100644 index 0000000000000..ad1d5390a4b46 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DeploymentResourceData.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class representing the DeploymentResource data model. + public partial class DeploymentResourceData : ResourceData + { + /// Initializes a new instance of DeploymentResourceData. + public DeploymentResourceData() + { + } + + /// Initializes a new instance of DeploymentResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Properties of the Deployment resource. + /// Sku of the Deployment resource. + internal DeploymentResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DeploymentResourceProperties properties, AppPlatformSku sku) : base(id, name, resourceType, systemData) + { + Properties = properties; + Sku = sku; + } + + /// Properties of the Deployment resource. + public DeploymentResourceProperties Properties { get; set; } + /// Sku of the Deployment resource. + public AppPlatformSku Sku { 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 new file mode 100644 index 0000000000000..9fcf052c4d46c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/AppPlatformExtensions.cs @@ -0,0 +1,657 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class to add extension methods to Azure.ResourceManager.AppPlatform. + public static partial class AppPlatformExtensions + { + private static TenantResourceExtensionClient GetExtensionClient(TenantResource tenantResource) + { + return tenantResource.GetCachedClient((client) => + { + return new TenantResourceExtensionClient(client, tenantResource.Id); + } + ); + } + + /// + /// Lists all of the available runtime versions supported by Microsoft.AppPlatform provider. + /// Request Path: /providers/Microsoft.AppPlatform/runtimeVersions + /// Operation Id: RuntimeVersions_ListRuntimeVersions + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetRuntimeVersionsRuntimeVersionsAsync(this TenantResource tenantResource, CancellationToken cancellationToken = default) + { + return GetExtensionClient(tenantResource).GetRuntimeVersionsRuntimeVersionsAsync(cancellationToken); + } + + /// + /// Lists all of the available runtime versions supported by Microsoft.AppPlatform provider. + /// Request Path: /providers/Microsoft.AppPlatform/runtimeVersions + /// Operation Id: RuntimeVersions_ListRuntimeVersions + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetRuntimeVersionsRuntimeVersions(this TenantResource tenantResource, CancellationToken cancellationToken = default) + { + return GetExtensionClient(tenantResource).GetRuntimeVersionsRuntimeVersions(cancellationToken); + } + + private static SubscriptionResourceExtensionClient GetExtensionClient(SubscriptionResource subscriptionResource) + { + return subscriptionResource.GetCachedClient((client) => + { + return new SubscriptionResourceExtensionClient(client, subscriptionResource.Id); + } + ); + } + + /// + /// Checks that the resource name is valid and is not already in use. + /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/locations/{location}/checkNameAvailability + /// Operation Id: Services_CheckNameAvailability + /// + /// The instance the method will execute against. + /// the region. + /// Parameters supplied to the operation. + /// The cancellation token to use. + /// is null. + public static async Task> CheckNameAvailabilityServiceAsync(this SubscriptionResource subscriptionResource, AzureLocation location, NameAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + return await GetExtensionClient(subscriptionResource).CheckNameAvailabilityServiceAsync(location, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// Checks that the resource name is valid and is not already in use. + /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/locations/{location}/checkNameAvailability + /// Operation Id: Services_CheckNameAvailability + /// + /// The instance the method will execute against. + /// the region. + /// Parameters supplied to the operation. + /// The cancellation token to use. + /// is null. + public static Response CheckNameAvailabilityService(this SubscriptionResource subscriptionResource, AzureLocation location, NameAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + return GetExtensionClient(subscriptionResource).CheckNameAvailabilityService(location, content, cancellationToken); + } + + /// + /// Handles requests to list all resources in a subscription. + /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/Spring + /// Operation Id: Services_ListBySubscription + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetServiceResourcesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + return GetExtensionClient(subscriptionResource).GetServiceResourcesAsync(cancellationToken); + } + + /// + /// Handles requests to list all resources in a subscription. + /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/Spring + /// Operation Id: Services_ListBySubscription + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetServiceResources(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + return GetExtensionClient(subscriptionResource).GetServiceResources(cancellationToken); + } + + /// + /// Lists all of the available skus of the Microsoft.AppPlatform provider. + /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/skus + /// Operation Id: Skus_List + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetSkusAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + return GetExtensionClient(subscriptionResource).GetSkusAsync(cancellationToken); + } + + /// + /// Lists all of the available skus of the Microsoft.AppPlatform provider. + /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/skus + /// Operation Id: Skus_List + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetSkus(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + return GetExtensionClient(subscriptionResource).GetSkus(cancellationToken); + } + + private static ResourceGroupResourceExtensionClient GetExtensionClient(ResourceGroupResource resourceGroupResource) + { + return resourceGroupResource.GetCachedClient((client) => + { + return new ResourceGroupResourceExtensionClient(client, resourceGroupResource.Id); + } + ); + } + + /// Gets a collection of ServiceResources in the ResourceGroupResource. + /// The instance the method will execute against. + /// An object representing collection of ServiceResources and their operations over a ServiceResource. + public static ServiceResourceCollection GetServiceResources(this ResourceGroupResource resourceGroupResource) + { + return GetExtensionClient(resourceGroupResource).GetServiceResources(); + } + + /// + /// Get a Service and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName} + /// Operation Id: Services_Get + /// + /// The instance the method will execute against. + /// The name of the Service resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static async Task> GetServiceResourceAsync(this ResourceGroupResource resourceGroupResource, string serviceName, CancellationToken cancellationToken = default) + { + return await resourceGroupResource.GetServiceResources().GetAsync(serviceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Service and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName} + /// Operation Id: Services_Get + /// + /// The instance the method will execute against. + /// The name of the Service resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static Response GetServiceResource(this ResourceGroupResource resourceGroupResource, string serviceName, CancellationToken cancellationToken = default) + { + return resourceGroupResource.GetServiceResources().Get(serviceName, cancellationToken); + } + + #region ServiceResource + /// + /// 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 ServiceResource GetServiceResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + ServiceResource.ValidateResourceId(id); + return new ServiceResource(client, id); + } + ); + } + #endregion + + #region ConfigServerResource + /// + /// 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 ConfigServerResource GetConfigServerResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + ConfigServerResource.ValidateResourceId(id); + return new ConfigServerResource(client, id); + } + ); + } + #endregion + + #region ConfigurationServiceResource + /// + /// 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 ConfigurationServiceResource GetConfigurationServiceResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + ConfigurationServiceResource.ValidateResourceId(id); + return new ConfigurationServiceResource(client, id); + } + ); + } + #endregion + + #region ServiceRegistryResource + /// + /// 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 ServiceRegistryResource GetServiceRegistryResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + ServiceRegistryResource.ValidateResourceId(id); + return new ServiceRegistryResource(client, id); + } + ); + } + #endregion + + #region BuildServiceResource + /// + /// 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 BuildServiceResource GetBuildServiceResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + BuildServiceResource.ValidateResourceId(id); + return new BuildServiceResource(client, id); + } + ); + } + #endregion + + #region BuildResource + /// + /// 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 BuildResource GetBuildResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + BuildResource.ValidateResourceId(id); + return new BuildResource(client, id); + } + ); + } + #endregion + + #region BuildResultResource + /// + /// 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 BuildResultResource GetBuildResultResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + BuildResultResource.ValidateResourceId(id); + return new BuildResultResource(client, id); + } + ); + } + #endregion + + #region SupportedBuildpackResource + /// + /// 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 SupportedBuildpackResource GetSupportedBuildpackResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + SupportedBuildpackResource.ValidateResourceId(id); + return new SupportedBuildpackResource(client, id); + } + ); + } + #endregion + + #region SupportedStackResource + /// + /// 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 SupportedStackResource GetSupportedStackResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + SupportedStackResource.ValidateResourceId(id); + return new SupportedStackResource(client, id); + } + ); + } + #endregion + + #region BuildpackBindingResource + /// + /// 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 BuildpackBindingResource GetBuildpackBindingResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + BuildpackBindingResource.ValidateResourceId(id); + return new BuildpackBindingResource(client, id); + } + ); + } + #endregion + + #region BuilderResource + /// + /// 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 BuilderResource GetBuilderResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + BuilderResource.ValidateResourceId(id); + return new BuilderResource(client, id); + } + ); + } + #endregion + + #region BuildServiceAgentPoolResource + /// + /// 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 BuildServiceAgentPoolResource GetBuildServiceAgentPoolResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + BuildServiceAgentPoolResource.ValidateResourceId(id); + return new BuildServiceAgentPoolResource(client, id); + } + ); + } + #endregion + + #region MonitoringSettingResource + /// + /// 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 MonitoringSettingResource GetMonitoringSettingResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + MonitoringSettingResource.ValidateResourceId(id); + return new MonitoringSettingResource(client, id); + } + ); + } + #endregion + + #region AppResource + /// + /// 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 AppResource GetAppResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + AppResource.ValidateResourceId(id); + return new AppResource(client, id); + } + ); + } + #endregion + + #region BindingResource + /// + /// 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 BindingResource GetBindingResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + BindingResource.ValidateResourceId(id); + return new BindingResource(client, id); + } + ); + } + #endregion + + #region StorageResource + /// + /// 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 StorageResource GetStorageResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + StorageResource.ValidateResourceId(id); + return new StorageResource(client, id); + } + ); + } + #endregion + + #region CertificateResource + /// + /// 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 CertificateResource GetCertificateResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + CertificateResource.ValidateResourceId(id); + return new CertificateResource(client, id); + } + ); + } + #endregion + + #region CustomDomainResource + /// + /// 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 CustomDomainResource GetCustomDomainResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + CustomDomainResource.ValidateResourceId(id); + return new CustomDomainResource(client, id); + } + ); + } + #endregion + + #region DeploymentResource + /// + /// 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 DeploymentResource GetDeploymentResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + DeploymentResource.ValidateResourceId(id); + return new DeploymentResource(client, id); + } + ); + } + #endregion + + #region GatewayResource + /// + /// 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 GatewayResource GetGatewayResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + GatewayResource.ValidateResourceId(id); + return new GatewayResource(client, id); + } + ); + } + #endregion + + #region GatewayRouteConfigResource + /// + /// 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 GatewayRouteConfigResource GetGatewayRouteConfigResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + GatewayRouteConfigResource.ValidateResourceId(id); + return new GatewayRouteConfigResource(client, id); + } + ); + } + #endregion + + #region GatewayCustomDomainResource + /// + /// 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 GatewayCustomDomainResource GetGatewayCustomDomainResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + GatewayCustomDomainResource.ValidateResourceId(id); + return new GatewayCustomDomainResource(client, id); + } + ); + } + #endregion + + #region ApiPortalResource + /// + /// 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 ApiPortalResource GetApiPortalResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + ApiPortalResource.ValidateResourceId(id); + return new ApiPortalResource(client, id); + } + ); + } + #endregion + + #region ApiPortalCustomDomainResource + /// + /// 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 ApiPortalCustomDomainResource GetApiPortalCustomDomainResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + ApiPortalCustomDomainResource.ValidateResourceId(id); + return new ApiPortalCustomDomainResource(client, id); + } + ); + } + #endregion + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs new file mode 100644 index 0000000000000..9ceadcdb86299 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class to add extension methods to ResourceGroupResource. + internal partial class ResourceGroupResourceExtensionClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected ResourceGroupResourceExtensionClient() + { + } + + /// 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 ResourceGroupResourceExtensionClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of ServiceResources in the ResourceGroupResource. + /// An object representing collection of ServiceResources and their operations over a ServiceResource. + public virtual ServiceResourceCollection GetServiceResources() + { + return GetCachedClient(Client => new ServiceResourceCollection(Client, Id)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs new file mode 100644 index 0000000000000..602c82926f7ec --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Linq; +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 to add extension methods to SubscriptionResource. + internal partial class SubscriptionResourceExtensionClient : ArmResource + { + private ClientDiagnostics _serviceResourceServicesClientDiagnostics; + private ServicesRestOperations _serviceResourceServicesRestClient; + private ClientDiagnostics _skusClientDiagnostics; + private SkusRestOperations _skusRestClient; + + /// Initializes a new instance of the class for mocking. + protected SubscriptionResourceExtensionClient() + { + } + + /// 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 SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics ServiceResourceServicesClientDiagnostics => _serviceResourceServicesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ServiceResource.ResourceType.Namespace, Diagnostics); + private ServicesRestOperations ServiceResourceServicesRestClient => _serviceResourceServicesRestClient ??= new ServicesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ServiceResource.ResourceType)); + private ClientDiagnostics SkusClientDiagnostics => _skusClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private SkusRestOperations SkusRestClient => _skusRestClient ??= new SkusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// Checks that the resource name is valid and is not already in use. + /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/locations/{location}/checkNameAvailability + /// Operation Id: Services_CheckNameAvailability + /// + /// the region. + /// Parameters supplied to the operation. + /// The cancellation token to use. + public virtual async Task> CheckNameAvailabilityServiceAsync(AzureLocation location, NameAvailabilityContent content, CancellationToken cancellationToken = default) + { + using var scope = ServiceResourceServicesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckNameAvailabilityService"); + scope.Start(); + try + { + var response = await ServiceResourceServicesRestClient.CheckNameAvailabilityAsync(Id.SubscriptionId, location, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks that the resource name is valid and is not already in use. + /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/locations/{location}/checkNameAvailability + /// Operation Id: Services_CheckNameAvailability + /// + /// the region. + /// Parameters supplied to the operation. + /// The cancellation token to use. + public virtual Response CheckNameAvailabilityService(AzureLocation location, NameAvailabilityContent content, CancellationToken cancellationToken = default) + { + using var scope = ServiceResourceServicesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckNameAvailabilityService"); + scope.Start(); + try + { + var response = ServiceResourceServicesRestClient.CheckNameAvailability(Id.SubscriptionId, location, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Handles requests to list all resources in a subscription. + /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/Spring + /// Operation Id: Services_ListBySubscription + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetServiceResourcesAsync(CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = ServiceResourceServicesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetServiceResources"); + scope.Start(); + try + { + var response = await ServiceResourceServicesRestClient.ListBySubscriptionAsync(Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new ServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = ServiceResourceServicesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetServiceResources"); + scope.Start(); + try + { + var response = await ServiceResourceServicesRestClient.ListBySubscriptionNextPageAsync(nextLink, Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new ServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Handles requests to list all resources in a subscription. + /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/Spring + /// Operation Id: Services_ListBySubscription + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetServiceResources(CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = ServiceResourceServicesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetServiceResources"); + scope.Start(); + try + { + var response = ServiceResourceServicesRestClient.ListBySubscription(Id.SubscriptionId, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new ServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = ServiceResourceServicesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetServiceResources"); + scope.Start(); + try + { + var response = ServiceResourceServicesRestClient.ListBySubscriptionNextPage(nextLink, Id.SubscriptionId, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new ServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Lists all of the available skus of the Microsoft.AppPlatform provider. + /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/skus + /// Operation Id: Skus_List + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSkusAsync(CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = SkusClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetSkus"); + scope.Start(); + try + { + var response = await SkusRestClient.ListAsync(Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = SkusClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetSkus"); + scope.Start(); + try + { + var response = await SkusRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Lists all of the available skus of the Microsoft.AppPlatform provider. + /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/skus + /// Operation Id: Skus_List + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSkus(CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = SkusClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetSkus"); + scope.Start(); + try + { + var response = SkusRestClient.List(Id.SubscriptionId, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = SkusClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetSkus"); + scope.Start(); + try + { + var response = SkusRestClient.ListNextPage(nextLink, Id.SubscriptionId, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/TenantResourceExtensionClient.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/TenantResourceExtensionClient.cs new file mode 100644 index 0000000000000..a8d52b56c7c75 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/TenantResourceExtensionClient.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +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 to add extension methods to TenantResource. + internal partial class TenantResourceExtensionClient : ArmResource + { + private ClientDiagnostics _runtimeVersionsClientDiagnostics; + private RuntimeVersionsRestOperations _runtimeVersionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected TenantResourceExtensionClient() + { + } + + /// 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 TenantResourceExtensionClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics RuntimeVersionsClientDiagnostics => _runtimeVersionsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private RuntimeVersionsRestOperations RuntimeVersionsRestClient => _runtimeVersionsRestClient ??= new RuntimeVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// Lists all of the available runtime versions supported by Microsoft.AppPlatform provider. + /// Request Path: /providers/Microsoft.AppPlatform/runtimeVersions + /// Operation Id: RuntimeVersions_ListRuntimeVersions + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetRuntimeVersionsRuntimeVersionsAsync(CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = RuntimeVersionsClientDiagnostics.CreateScope("TenantResourceExtensionClient.GetRuntimeVersionsRuntimeVersions"); + scope.Start(); + try + { + var response = await RuntimeVersionsRestClient.ListRuntimeVersionsAsync(cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, null); + } + + /// + /// Lists all of the available runtime versions supported by Microsoft.AppPlatform provider. + /// Request Path: /providers/Microsoft.AppPlatform/runtimeVersions + /// Operation Id: RuntimeVersions_ListRuntimeVersions + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetRuntimeVersionsRuntimeVersions(CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = RuntimeVersionsClientDiagnostics.CreateScope("TenantResourceExtensionClient.GetRuntimeVersionsRuntimeVersions"); + scope.Start(); + try + { + var response = RuntimeVersionsRestClient.ListRuntimeVersions(cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value, null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, null); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayCustomDomainResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayCustomDomainResource.cs new file mode 100644 index 0000000000000..1c70fa8f0d227 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayCustomDomainResource.cs @@ -0,0 +1,249 @@ +// 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 GatewayCustomDomainResource 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 GetGatewayCustomDomainResource method. + /// Otherwise you can get one from its parent resource using the GetGatewayCustomDomainResource method. + /// + public partial class GatewayCustomDomainResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, string domainName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains/{domainName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _gatewayCustomDomainResourceGatewayCustomDomainsClientDiagnostics; + private readonly GatewayCustomDomainsRestOperations _gatewayCustomDomainResourceGatewayCustomDomainsRestClient; + private readonly GatewayCustomDomainResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected GatewayCustomDomainResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal GatewayCustomDomainResource(ArmClient client, GatewayCustomDomainResourceData 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 GatewayCustomDomainResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _gatewayCustomDomainResourceGatewayCustomDomainsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string gatewayCustomDomainResourceGatewayCustomDomainsApiVersion); + _gatewayCustomDomainResourceGatewayCustomDomainsRestClient = new GatewayCustomDomainsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, gatewayCustomDomainResourceGatewayCustomDomainsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/gateways/domains"; + + /// 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 GatewayCustomDomainResourceData 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 Spring Cloud Gateway custom domain. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains/{domainName} + /// Operation Id: GatewayCustomDomains_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _gatewayCustomDomainResourceGatewayCustomDomainsClientDiagnostics.CreateScope("GatewayCustomDomainResource.Get"); + scope.Start(); + try + { + var response = await _gatewayCustomDomainResourceGatewayCustomDomainsRestClient.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 GatewayCustomDomainResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Spring Cloud Gateway custom domain. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains/{domainName} + /// Operation Id: GatewayCustomDomains_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _gatewayCustomDomainResourceGatewayCustomDomainsClientDiagnostics.CreateScope("GatewayCustomDomainResource.Get"); + scope.Start(); + try + { + var response = _gatewayCustomDomainResourceGatewayCustomDomainsRestClient.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 GatewayCustomDomainResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the Spring Cloud Gateway custom domain. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains/{domainName} + /// Operation Id: GatewayCustomDomains_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 = _gatewayCustomDomainResourceGatewayCustomDomainsClientDiagnostics.CreateScope("GatewayCustomDomainResource.Delete"); + scope.Start(); + try + { + var response = await _gatewayCustomDomainResourceGatewayCustomDomainsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_gatewayCustomDomainResourceGatewayCustomDomainsClientDiagnostics, Pipeline, _gatewayCustomDomainResourceGatewayCustomDomainsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the Spring Cloud Gateway custom domain. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains/{domainName} + /// Operation Id: GatewayCustomDomains_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 = _gatewayCustomDomainResourceGatewayCustomDomainsClientDiagnostics.CreateScope("GatewayCustomDomainResource.Delete"); + scope.Start(); + try + { + var response = _gatewayCustomDomainResourceGatewayCustomDomainsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_gatewayCustomDomainResourceGatewayCustomDomainsClientDiagnostics, Pipeline, _gatewayCustomDomainResourceGatewayCustomDomainsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update the Spring Cloud Gateway custom domain. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains/{domainName} + /// Operation Id: GatewayCustomDomains_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 gateway custom domain resource for the create or update operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, GatewayCustomDomainResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _gatewayCustomDomainResourceGatewayCustomDomainsClientDiagnostics.CreateScope("GatewayCustomDomainResource.Update"); + scope.Start(); + try + { + var response = await _gatewayCustomDomainResourceGatewayCustomDomainsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new GatewayCustomDomainResourceOperationSource(Client), _gatewayCustomDomainResourceGatewayCustomDomainsClientDiagnostics, Pipeline, _gatewayCustomDomainResourceGatewayCustomDomainsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update the Spring Cloud Gateway custom domain. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains/{domainName} + /// Operation Id: GatewayCustomDomains_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 gateway custom domain resource for the create or update operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, GatewayCustomDomainResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _gatewayCustomDomainResourceGatewayCustomDomainsClientDiagnostics.CreateScope("GatewayCustomDomainResource.Update"); + scope.Start(); + try + { + var response = _gatewayCustomDomainResourceGatewayCustomDomainsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new GatewayCustomDomainResourceOperationSource(Client), _gatewayCustomDomainResourceGatewayCustomDomainsClientDiagnostics, Pipeline, _gatewayCustomDomainResourceGatewayCustomDomainsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + 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/GatewayCustomDomainResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayCustomDomainResourceCollection.cs new file mode 100644 index 0000000000000..08616155937f9 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayCustomDomainResourceCollection.cs @@ -0,0 +1,333 @@ +// 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.Linq; +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 GetGatewayCustomDomainResources method from an instance of . + /// + public partial class GatewayCustomDomainResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _gatewayCustomDomainResourceGatewayCustomDomainsClientDiagnostics; + private readonly GatewayCustomDomainsRestOperations _gatewayCustomDomainResourceGatewayCustomDomainsRestClient; + + /// Initializes a new instance of the class for mocking. + protected GatewayCustomDomainResourceCollection() + { + } + + /// 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 GatewayCustomDomainResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _gatewayCustomDomainResourceGatewayCustomDomainsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", GatewayCustomDomainResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(GatewayCustomDomainResource.ResourceType, out string gatewayCustomDomainResourceGatewayCustomDomainsApiVersion); + _gatewayCustomDomainResourceGatewayCustomDomainsRestClient = new GatewayCustomDomainsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, gatewayCustomDomainResourceGatewayCustomDomainsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != GatewayResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, GatewayResource.ResourceType), nameof(id)); + } + + /// + /// Create or update the Spring Cloud Gateway custom domain. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains/{domainName} + /// Operation Id: GatewayCustomDomains_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 Spring Cloud Gateway custom domain. + /// The gateway custom domain resource 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 domainName, GatewayCustomDomainResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _gatewayCustomDomainResourceGatewayCustomDomainsClientDiagnostics.CreateScope("GatewayCustomDomainResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _gatewayCustomDomainResourceGatewayCustomDomainsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new GatewayCustomDomainResourceOperationSource(Client), _gatewayCustomDomainResourceGatewayCustomDomainsClientDiagnostics, Pipeline, _gatewayCustomDomainResourceGatewayCustomDomainsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update the Spring Cloud Gateway custom domain. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains/{domainName} + /// Operation Id: GatewayCustomDomains_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 Spring Cloud Gateway custom domain. + /// The gateway custom domain resource 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 domainName, GatewayCustomDomainResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _gatewayCustomDomainResourceGatewayCustomDomainsClientDiagnostics.CreateScope("GatewayCustomDomainResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _gatewayCustomDomainResourceGatewayCustomDomainsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new GatewayCustomDomainResourceOperationSource(Client), _gatewayCustomDomainResourceGatewayCustomDomainsClientDiagnostics, Pipeline, _gatewayCustomDomainResourceGatewayCustomDomainsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Spring Cloud Gateway custom domain. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains/{domainName} + /// Operation Id: GatewayCustomDomains_Get + /// + /// The name of the Spring Cloud Gateway custom domain. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var scope = _gatewayCustomDomainResourceGatewayCustomDomainsClientDiagnostics.CreateScope("GatewayCustomDomainResourceCollection.Get"); + scope.Start(); + try + { + var response = await _gatewayCustomDomainResourceGatewayCustomDomainsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GatewayCustomDomainResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Spring Cloud Gateway custom domain. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains/{domainName} + /// Operation Id: GatewayCustomDomains_Get + /// + /// The name of the Spring Cloud Gateway custom domain. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var scope = _gatewayCustomDomainResourceGatewayCustomDomainsClientDiagnostics.CreateScope("GatewayCustomDomainResourceCollection.Get"); + scope.Start(); + try + { + var response = _gatewayCustomDomainResourceGatewayCustomDomainsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GatewayCustomDomainResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Handle requests to list all Spring Cloud Gateway custom domains. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains + /// Operation Id: GatewayCustomDomains_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) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _gatewayCustomDomainResourceGatewayCustomDomainsClientDiagnostics.CreateScope("GatewayCustomDomainResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _gatewayCustomDomainResourceGatewayCustomDomainsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new GatewayCustomDomainResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _gatewayCustomDomainResourceGatewayCustomDomainsClientDiagnostics.CreateScope("GatewayCustomDomainResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _gatewayCustomDomainResourceGatewayCustomDomainsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new GatewayCustomDomainResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Handle requests to list all Spring Cloud Gateway custom domains. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains + /// Operation Id: GatewayCustomDomains_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) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _gatewayCustomDomainResourceGatewayCustomDomainsClientDiagnostics.CreateScope("GatewayCustomDomainResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _gatewayCustomDomainResourceGatewayCustomDomainsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new GatewayCustomDomainResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _gatewayCustomDomainResourceGatewayCustomDomainsClientDiagnostics.CreateScope("GatewayCustomDomainResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _gatewayCustomDomainResourceGatewayCustomDomainsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new GatewayCustomDomainResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains/{domainName} + /// Operation Id: GatewayCustomDomains_Get + /// + /// The name of the Spring Cloud Gateway custom domain. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var scope = _gatewayCustomDomainResourceGatewayCustomDomainsClientDiagnostics.CreateScope("GatewayCustomDomainResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _gatewayCustomDomainResourceGatewayCustomDomainsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, 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}/gateways/{gatewayName}/domains/{domainName} + /// Operation Id: GatewayCustomDomains_Get + /// + /// The name of the Spring Cloud Gateway custom domain. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var scope = _gatewayCustomDomainResourceGatewayCustomDomainsClientDiagnostics.CreateScope("GatewayCustomDomainResourceCollection.Exists"); + scope.Start(); + try + { + var response = _gatewayCustomDomainResourceGatewayCustomDomainsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, 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/GatewayCustomDomainResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayCustomDomainResourceData.cs new file mode 100644 index 0000000000000..7257af05c33d9 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayCustomDomainResourceData.cs @@ -0,0 +1,47 @@ +// 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 GatewayCustomDomainResource data model. + public partial class GatewayCustomDomainResourceData : ResourceData + { + /// Initializes a new instance of GatewayCustomDomainResourceData. + public GatewayCustomDomainResourceData() + { + } + + /// Initializes a new instance of GatewayCustomDomainResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The properties of custom domain for Spring Cloud Gateway. + internal GatewayCustomDomainResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, GatewayCustomDomainProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// The properties of custom domain for Spring Cloud Gateway. + internal GatewayCustomDomainProperties Properties { get; set; } + /// The thumbprint of bound certificate. + public string GatewayCustomDomainThumbprint + { + get => Properties is null ? default : Properties.Thumbprint; + set + { + if (Properties is null) + Properties = new GatewayCustomDomainProperties(); + Properties.Thumbprint = value; + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayResource.cs new file mode 100644 index 0000000000000..7fc680d1b0109 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayResource.cs @@ -0,0 +1,376 @@ +// 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 GatewayResource 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 GetGatewayResource method. + /// Otherwise you can get one from its parent resource using the GetGatewayResource method. + /// + public partial class GatewayResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _gatewayResourceGatewaysClientDiagnostics; + private readonly GatewaysRestOperations _gatewayResourceGatewaysRestClient; + private readonly GatewayResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected GatewayResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal GatewayResource(ArmClient client, GatewayResourceData 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 GatewayResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _gatewayResourceGatewaysClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string gatewayResourceGatewaysApiVersion); + _gatewayResourceGatewaysRestClient = new GatewaysRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, gatewayResourceGatewaysApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/gateways"; + + /// 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 GatewayResourceData 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 GatewayRouteConfigResources in the GatewayResource. + /// An object representing collection of GatewayRouteConfigResources and their operations over a GatewayRouteConfigResource. + public virtual GatewayRouteConfigResourceCollection GetGatewayRouteConfigResources() + { + return GetCachedClient(Client => new GatewayRouteConfigResourceCollection(Client, Id)); + } + + /// + /// Get the Spring Cloud Gateway route configs. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs/{routeConfigName} + /// Operation Id: GatewayRouteConfigs_Get + /// + /// The name of the Spring Cloud Gateway route config. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetGatewayRouteConfigResourceAsync(string routeConfigName, CancellationToken cancellationToken = default) + { + return await GetGatewayRouteConfigResources().GetAsync(routeConfigName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the Spring Cloud Gateway route configs. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs/{routeConfigName} + /// Operation Id: GatewayRouteConfigs_Get + /// + /// The name of the Spring Cloud Gateway route config. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetGatewayRouteConfigResource(string routeConfigName, CancellationToken cancellationToken = default) + { + return GetGatewayRouteConfigResources().Get(routeConfigName, cancellationToken); + } + + /// Gets a collection of GatewayCustomDomainResources in the GatewayResource. + /// An object representing collection of GatewayCustomDomainResources and their operations over a GatewayCustomDomainResource. + public virtual GatewayCustomDomainResourceCollection GetGatewayCustomDomainResources() + { + return GetCachedClient(Client => new GatewayCustomDomainResourceCollection(Client, Id)); + } + + /// + /// Get the Spring Cloud Gateway custom domain. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains/{domainName} + /// Operation Id: GatewayCustomDomains_Get + /// + /// The name of the Spring Cloud Gateway custom domain. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetGatewayCustomDomainResourceAsync(string domainName, CancellationToken cancellationToken = default) + { + return await GetGatewayCustomDomainResources().GetAsync(domainName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the Spring Cloud Gateway custom domain. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains/{domainName} + /// Operation Id: GatewayCustomDomains_Get + /// + /// The name of the Spring Cloud Gateway custom domain. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetGatewayCustomDomainResource(string domainName, CancellationToken cancellationToken = default) + { + return GetGatewayCustomDomainResources().Get(domainName, cancellationToken); + } + + /// + /// Get the Spring Cloud Gateway and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName} + /// Operation Id: Gateways_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _gatewayResourceGatewaysClientDiagnostics.CreateScope("GatewayResource.Get"); + scope.Start(); + try + { + var response = await _gatewayResourceGatewaysRestClient.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 GatewayResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Spring Cloud Gateway and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName} + /// Operation Id: Gateways_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _gatewayResourceGatewaysClientDiagnostics.CreateScope("GatewayResource.Get"); + scope.Start(); + try + { + var response = _gatewayResourceGatewaysRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GatewayResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Disable the default Spring Cloud Gateway. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName} + /// Operation Id: Gateways_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 = _gatewayResourceGatewaysClientDiagnostics.CreateScope("GatewayResource.Delete"); + scope.Start(); + try + { + var response = await _gatewayResourceGatewaysRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_gatewayResourceGatewaysClientDiagnostics, Pipeline, _gatewayResourceGatewaysRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Disable the default Spring Cloud Gateway. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName} + /// Operation Id: Gateways_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 = _gatewayResourceGatewaysClientDiagnostics.CreateScope("GatewayResource.Delete"); + scope.Start(); + try + { + var response = _gatewayResourceGatewaysRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_gatewayResourceGatewaysClientDiagnostics, Pipeline, _gatewayResourceGatewaysRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create the default Spring Cloud Gateway or update the existing Spring Cloud Gateway. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName} + /// Operation Id: Gateways_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 gateway for the create or update operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, GatewayResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _gatewayResourceGatewaysClientDiagnostics.CreateScope("GatewayResource.Update"); + scope.Start(); + try + { + var response = await _gatewayResourceGatewaysRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new GatewayResourceOperationSource(Client), _gatewayResourceGatewaysClientDiagnostics, Pipeline, _gatewayResourceGatewaysRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create the default Spring Cloud Gateway or update the existing Spring Cloud Gateway. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName} + /// Operation Id: Gateways_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 gateway for the create or update operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, GatewayResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _gatewayResourceGatewaysClientDiagnostics.CreateScope("GatewayResource.Update"); + scope.Start(); + try + { + var response = _gatewayResourceGatewaysRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new GatewayResourceOperationSource(Client), _gatewayResourceGatewaysClientDiagnostics, Pipeline, _gatewayResourceGatewaysRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Check the domains are valid as well as not in use. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/validateDomain + /// Operation Id: Gateways_ValidateDomain + /// + /// Custom domain payload to be validated. + /// The cancellation token to use. + /// is null. + public virtual async Task> ValidateDomainAsync(CustomDomainValidatePayload validatePayload, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(validatePayload, nameof(validatePayload)); + + using var scope = _gatewayResourceGatewaysClientDiagnostics.CreateScope("GatewayResource.ValidateDomain"); + scope.Start(); + try + { + var response = await _gatewayResourceGatewaysRestClient.ValidateDomainAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, validatePayload, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Check the domains are valid as well as not in use. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/validateDomain + /// Operation Id: Gateways_ValidateDomain + /// + /// Custom domain payload to be validated. + /// The cancellation token to use. + /// is null. + public virtual Response ValidateDomain(CustomDomainValidatePayload validatePayload, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(validatePayload, nameof(validatePayload)); + + using var scope = _gatewayResourceGatewaysClientDiagnostics.CreateScope("GatewayResource.ValidateDomain"); + scope.Start(); + try + { + var response = _gatewayResourceGatewaysRestClient.ValidateDomain(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, validatePayload, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayResourceCollection.cs new file mode 100644 index 0000000000000..5452c949fbe37 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayResourceCollection.cs @@ -0,0 +1,333 @@ +// 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.Linq; +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 GetGatewayResources method from an instance of . + /// + public partial class GatewayResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _gatewayResourceGatewaysClientDiagnostics; + private readonly GatewaysRestOperations _gatewayResourceGatewaysRestClient; + + /// Initializes a new instance of the class for mocking. + protected GatewayResourceCollection() + { + } + + /// 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 GatewayResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _gatewayResourceGatewaysClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", GatewayResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(GatewayResource.ResourceType, out string gatewayResourceGatewaysApiVersion); + _gatewayResourceGatewaysRestClient = new GatewaysRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, gatewayResourceGatewaysApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ServiceResource.ResourceType), nameof(id)); + } + + /// + /// Create the default Spring Cloud Gateway or update the existing Spring Cloud Gateway. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName} + /// Operation Id: Gateways_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 Spring Cloud Gateway. + /// The gateway 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 gatewayName, GatewayResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _gatewayResourceGatewaysClientDiagnostics.CreateScope("GatewayResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _gatewayResourceGatewaysRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, gatewayName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new GatewayResourceOperationSource(Client), _gatewayResourceGatewaysClientDiagnostics, Pipeline, _gatewayResourceGatewaysRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, gatewayName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create the default Spring Cloud Gateway or update the existing Spring Cloud Gateway. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName} + /// Operation Id: Gateways_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 Spring Cloud Gateway. + /// The gateway 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 gatewayName, GatewayResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _gatewayResourceGatewaysClientDiagnostics.CreateScope("GatewayResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _gatewayResourceGatewaysRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, gatewayName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new GatewayResourceOperationSource(Client), _gatewayResourceGatewaysClientDiagnostics, Pipeline, _gatewayResourceGatewaysRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, gatewayName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Spring Cloud Gateway and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName} + /// Operation Id: Gateways_Get + /// + /// The name of Spring Cloud Gateway. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var scope = _gatewayResourceGatewaysClientDiagnostics.CreateScope("GatewayResourceCollection.Get"); + scope.Start(); + try + { + var response = await _gatewayResourceGatewaysRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, gatewayName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GatewayResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Spring Cloud Gateway and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName} + /// Operation Id: Gateways_Get + /// + /// The name of Spring Cloud Gateway. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var scope = _gatewayResourceGatewaysClientDiagnostics.CreateScope("GatewayResourceCollection.Get"); + scope.Start(); + try + { + var response = _gatewayResourceGatewaysRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, gatewayName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GatewayResource(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}/gateways + /// Operation Id: Gateways_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) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _gatewayResourceGatewaysClientDiagnostics.CreateScope("GatewayResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _gatewayResourceGatewaysRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new GatewayResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _gatewayResourceGatewaysClientDiagnostics.CreateScope("GatewayResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _gatewayResourceGatewaysRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new GatewayResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Handles requests to list all resources in a Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways + /// Operation Id: Gateways_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) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _gatewayResourceGatewaysClientDiagnostics.CreateScope("GatewayResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _gatewayResourceGatewaysRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new GatewayResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _gatewayResourceGatewaysClientDiagnostics.CreateScope("GatewayResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _gatewayResourceGatewaysRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new GatewayResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName} + /// Operation Id: Gateways_Get + /// + /// The name of Spring Cloud Gateway. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var scope = _gatewayResourceGatewaysClientDiagnostics.CreateScope("GatewayResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _gatewayResourceGatewaysRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, gatewayName, 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}/gateways/{gatewayName} + /// Operation Id: Gateways_Get + /// + /// The name of Spring Cloud Gateway. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var scope = _gatewayResourceGatewaysClientDiagnostics.CreateScope("GatewayResourceCollection.Exists"); + scope.Start(); + try + { + var response = _gatewayResourceGatewaysRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, gatewayName, 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/GatewayResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayResourceData.cs new file mode 100644 index 0000000000000..9019603680af5 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayResourceData.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class representing the GatewayResource data model. + public partial class GatewayResourceData : ResourceData + { + /// Initializes a new instance of GatewayResourceData. + public GatewayResourceData() + { + } + + /// Initializes a new instance of GatewayResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Spring Cloud Gateway properties payload. + /// Sku of the Spring Cloud Gateway resource. + internal GatewayResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, GatewayProperties properties, AppPlatformSku sku) : base(id, name, resourceType, systemData) + { + Properties = properties; + Sku = sku; + } + + /// Spring Cloud Gateway properties payload. + public GatewayProperties Properties { get; set; } + /// Sku of the Spring Cloud Gateway resource. + public AppPlatformSku Sku { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayRouteConfigResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayRouteConfigResource.cs new file mode 100644 index 0000000000000..d6b355ccf1451 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayRouteConfigResource.cs @@ -0,0 +1,249 @@ +// 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 GatewayRouteConfigResource 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 GetGatewayRouteConfigResource method. + /// Otherwise you can get one from its parent resource using the GetGatewayRouteConfigResource method. + /// + public partial class GatewayRouteConfigResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, string routeConfigName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs/{routeConfigName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _gatewayRouteConfigResourceGatewayRouteConfigsClientDiagnostics; + private readonly GatewayRouteConfigsRestOperations _gatewayRouteConfigResourceGatewayRouteConfigsRestClient; + private readonly GatewayRouteConfigResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected GatewayRouteConfigResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal GatewayRouteConfigResource(ArmClient client, GatewayRouteConfigResourceData 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 GatewayRouteConfigResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _gatewayRouteConfigResourceGatewayRouteConfigsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string gatewayRouteConfigResourceGatewayRouteConfigsApiVersion); + _gatewayRouteConfigResourceGatewayRouteConfigsRestClient = new GatewayRouteConfigsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, gatewayRouteConfigResourceGatewayRouteConfigsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/gateways/routeConfigs"; + + /// 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 GatewayRouteConfigResourceData 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 Spring Cloud Gateway route configs. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs/{routeConfigName} + /// Operation Id: GatewayRouteConfigs_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _gatewayRouteConfigResourceGatewayRouteConfigsClientDiagnostics.CreateScope("GatewayRouteConfigResource.Get"); + scope.Start(); + try + { + var response = await _gatewayRouteConfigResourceGatewayRouteConfigsRestClient.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 GatewayRouteConfigResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Spring Cloud Gateway route configs. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs/{routeConfigName} + /// Operation Id: GatewayRouteConfigs_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _gatewayRouteConfigResourceGatewayRouteConfigsClientDiagnostics.CreateScope("GatewayRouteConfigResource.Get"); + scope.Start(); + try + { + var response = _gatewayRouteConfigResourceGatewayRouteConfigsRestClient.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 GatewayRouteConfigResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the Spring Cloud Gateway route config. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs/{routeConfigName} + /// Operation Id: GatewayRouteConfigs_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 = _gatewayRouteConfigResourceGatewayRouteConfigsClientDiagnostics.CreateScope("GatewayRouteConfigResource.Delete"); + scope.Start(); + try + { + var response = await _gatewayRouteConfigResourceGatewayRouteConfigsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_gatewayRouteConfigResourceGatewayRouteConfigsClientDiagnostics, Pipeline, _gatewayRouteConfigResourceGatewayRouteConfigsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the Spring Cloud Gateway route config. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs/{routeConfigName} + /// Operation Id: GatewayRouteConfigs_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 = _gatewayRouteConfigResourceGatewayRouteConfigsClientDiagnostics.CreateScope("GatewayRouteConfigResource.Delete"); + scope.Start(); + try + { + var response = _gatewayRouteConfigResourceGatewayRouteConfigsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_gatewayRouteConfigResourceGatewayRouteConfigsClientDiagnostics, Pipeline, _gatewayRouteConfigResourceGatewayRouteConfigsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create the default Spring Cloud Gateway route configs or update the existing Spring Cloud Gateway route configs. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs/{routeConfigName} + /// Operation Id: GatewayRouteConfigs_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 Spring Cloud Gateway route config for the create or update operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, GatewayRouteConfigResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _gatewayRouteConfigResourceGatewayRouteConfigsClientDiagnostics.CreateScope("GatewayRouteConfigResource.Update"); + scope.Start(); + try + { + var response = await _gatewayRouteConfigResourceGatewayRouteConfigsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new GatewayRouteConfigResourceOperationSource(Client), _gatewayRouteConfigResourceGatewayRouteConfigsClientDiagnostics, Pipeline, _gatewayRouteConfigResourceGatewayRouteConfigsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create the default Spring Cloud Gateway route configs or update the existing Spring Cloud Gateway route configs. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs/{routeConfigName} + /// Operation Id: GatewayRouteConfigs_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 Spring Cloud Gateway route config for the create or update operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, GatewayRouteConfigResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _gatewayRouteConfigResourceGatewayRouteConfigsClientDiagnostics.CreateScope("GatewayRouteConfigResource.Update"); + scope.Start(); + try + { + var response = _gatewayRouteConfigResourceGatewayRouteConfigsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new GatewayRouteConfigResourceOperationSource(Client), _gatewayRouteConfigResourceGatewayRouteConfigsClientDiagnostics, Pipeline, _gatewayRouteConfigResourceGatewayRouteConfigsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + 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/GatewayRouteConfigResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayRouteConfigResourceCollection.cs new file mode 100644 index 0000000000000..a113faf3ecb5b --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayRouteConfigResourceCollection.cs @@ -0,0 +1,333 @@ +// 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.Linq; +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 GetGatewayRouteConfigResources method from an instance of . + /// + public partial class GatewayRouteConfigResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _gatewayRouteConfigResourceGatewayRouteConfigsClientDiagnostics; + private readonly GatewayRouteConfigsRestOperations _gatewayRouteConfigResourceGatewayRouteConfigsRestClient; + + /// Initializes a new instance of the class for mocking. + protected GatewayRouteConfigResourceCollection() + { + } + + /// 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 GatewayRouteConfigResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _gatewayRouteConfigResourceGatewayRouteConfigsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", GatewayRouteConfigResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(GatewayRouteConfigResource.ResourceType, out string gatewayRouteConfigResourceGatewayRouteConfigsApiVersion); + _gatewayRouteConfigResourceGatewayRouteConfigsRestClient = new GatewayRouteConfigsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, gatewayRouteConfigResourceGatewayRouteConfigsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != GatewayResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, GatewayResource.ResourceType), nameof(id)); + } + + /// + /// Create the default Spring Cloud Gateway route configs or update the existing Spring Cloud Gateway route configs. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs/{routeConfigName} + /// Operation Id: GatewayRouteConfigs_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 Spring Cloud Gateway route config. + /// The Spring Cloud Gateway route config 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 routeConfigName, GatewayRouteConfigResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(routeConfigName, nameof(routeConfigName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _gatewayRouteConfigResourceGatewayRouteConfigsClientDiagnostics.CreateScope("GatewayRouteConfigResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _gatewayRouteConfigResourceGatewayRouteConfigsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, routeConfigName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new GatewayRouteConfigResourceOperationSource(Client), _gatewayRouteConfigResourceGatewayRouteConfigsClientDiagnostics, Pipeline, _gatewayRouteConfigResourceGatewayRouteConfigsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, routeConfigName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create the default Spring Cloud Gateway route configs or update the existing Spring Cloud Gateway route configs. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs/{routeConfigName} + /// Operation Id: GatewayRouteConfigs_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 Spring Cloud Gateway route config. + /// The Spring Cloud Gateway route config 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 routeConfigName, GatewayRouteConfigResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(routeConfigName, nameof(routeConfigName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _gatewayRouteConfigResourceGatewayRouteConfigsClientDiagnostics.CreateScope("GatewayRouteConfigResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _gatewayRouteConfigResourceGatewayRouteConfigsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, routeConfigName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new GatewayRouteConfigResourceOperationSource(Client), _gatewayRouteConfigResourceGatewayRouteConfigsClientDiagnostics, Pipeline, _gatewayRouteConfigResourceGatewayRouteConfigsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, routeConfigName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Spring Cloud Gateway route configs. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs/{routeConfigName} + /// Operation Id: GatewayRouteConfigs_Get + /// + /// The name of the Spring Cloud Gateway route config. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string routeConfigName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(routeConfigName, nameof(routeConfigName)); + + using var scope = _gatewayRouteConfigResourceGatewayRouteConfigsClientDiagnostics.CreateScope("GatewayRouteConfigResourceCollection.Get"); + scope.Start(); + try + { + var response = await _gatewayRouteConfigResourceGatewayRouteConfigsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, routeConfigName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GatewayRouteConfigResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Spring Cloud Gateway route configs. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs/{routeConfigName} + /// Operation Id: GatewayRouteConfigs_Get + /// + /// The name of the Spring Cloud Gateway route config. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string routeConfigName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(routeConfigName, nameof(routeConfigName)); + + using var scope = _gatewayRouteConfigResourceGatewayRouteConfigsClientDiagnostics.CreateScope("GatewayRouteConfigResourceCollection.Get"); + scope.Start(); + try + { + var response = _gatewayRouteConfigResourceGatewayRouteConfigsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, routeConfigName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GatewayRouteConfigResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Handle requests to list all Spring Cloud Gateway route configs. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs + /// Operation Id: GatewayRouteConfigs_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) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _gatewayRouteConfigResourceGatewayRouteConfigsClientDiagnostics.CreateScope("GatewayRouteConfigResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _gatewayRouteConfigResourceGatewayRouteConfigsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new GatewayRouteConfigResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _gatewayRouteConfigResourceGatewayRouteConfigsClientDiagnostics.CreateScope("GatewayRouteConfigResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _gatewayRouteConfigResourceGatewayRouteConfigsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new GatewayRouteConfigResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Handle requests to list all Spring Cloud Gateway route configs. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs + /// Operation Id: GatewayRouteConfigs_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) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _gatewayRouteConfigResourceGatewayRouteConfigsClientDiagnostics.CreateScope("GatewayRouteConfigResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _gatewayRouteConfigResourceGatewayRouteConfigsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new GatewayRouteConfigResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _gatewayRouteConfigResourceGatewayRouteConfigsClientDiagnostics.CreateScope("GatewayRouteConfigResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _gatewayRouteConfigResourceGatewayRouteConfigsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new GatewayRouteConfigResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs/{routeConfigName} + /// Operation Id: GatewayRouteConfigs_Get + /// + /// The name of the Spring Cloud Gateway route config. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string routeConfigName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(routeConfigName, nameof(routeConfigName)); + + using var scope = _gatewayRouteConfigResourceGatewayRouteConfigsClientDiagnostics.CreateScope("GatewayRouteConfigResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _gatewayRouteConfigResourceGatewayRouteConfigsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, routeConfigName, 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}/gateways/{gatewayName}/routeConfigs/{routeConfigName} + /// Operation Id: GatewayRouteConfigs_Get + /// + /// The name of the Spring Cloud Gateway route config. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string routeConfigName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(routeConfigName, nameof(routeConfigName)); + + using var scope = _gatewayRouteConfigResourceGatewayRouteConfigsClientDiagnostics.CreateScope("GatewayRouteConfigResourceCollection.Exists"); + scope.Start(); + try + { + var response = _gatewayRouteConfigResourceGatewayRouteConfigsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, routeConfigName, 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/GatewayRouteConfigResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayRouteConfigResourceData.cs new file mode 100644 index 0000000000000..efb572d62fb14 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayRouteConfigResourceData.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class representing the GatewayRouteConfigResource data model. + public partial class GatewayRouteConfigResourceData : ResourceData + { + /// Initializes a new instance of GatewayRouteConfigResourceData. + public GatewayRouteConfigResourceData() + { + } + + /// Initializes a new instance of GatewayRouteConfigResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// API route config of the Spring Cloud Gateway. + internal GatewayRouteConfigResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, GatewayRouteConfigProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// API route config of the Spring Cloud Gateway. + public GatewayRouteConfigProperties Properties { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ApiPortalCustomDomainResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ApiPortalCustomDomainResourceOperationSource.cs new file mode 100644 index 0000000000000..6edb3126d9123 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ApiPortalCustomDomainResourceOperationSource.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 ApiPortalCustomDomainResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ApiPortalCustomDomainResourceOperationSource(ArmClient client) + { + _client = client; + } + + ApiPortalCustomDomainResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = ApiPortalCustomDomainResourceData.DeserializeApiPortalCustomDomainResourceData(document.RootElement); + return new ApiPortalCustomDomainResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = ApiPortalCustomDomainResourceData.DeserializeApiPortalCustomDomainResourceData(document.RootElement); + return new ApiPortalCustomDomainResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ApiPortalResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ApiPortalResourceOperationSource.cs new file mode 100644 index 0000000000000..c736c2c7ca967 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ApiPortalResourceOperationSource.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 ApiPortalResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ApiPortalResourceOperationSource(ArmClient client) + { + _client = client; + } + + ApiPortalResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = ApiPortalResourceData.DeserializeApiPortalResourceData(document.RootElement); + return new ApiPortalResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = ApiPortalResourceData.DeserializeApiPortalResourceData(document.RootElement); + return new ApiPortalResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppPlatformArmOperation.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppPlatformArmOperation.cs new file mode 100644 index 0000000000000..54510033e6c3a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppPlatformArmOperation.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.AppPlatform +{ +#pragma warning disable SA1649 // File name should match first type name + internal class AppPlatformArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + + /// Initializes a new instance of AppPlatformArmOperation for mocking. + protected AppPlatformArmOperation() + { + } + + internal AppPlatformArmOperation(Response response) + { + _operation = OperationInternal.Succeeded(response); + } + + internal AppPlatformArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia); + _operation = new OperationInternal(clientDiagnostics, nextLinkOperation, response, "AppPlatformArmOperation", fallbackStrategy: new ExponentialDelayStrategy()); + } + + /// +#pragma warning disable CA1822 + public override string Id => throw new NotImplementedException(); +#pragma warning restore CA1822 + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override Response GetRawResponse() => _operation.RawResponse; + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override Response WaitForCompletionResponse(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(cancellationToken); + + /// + public override Response WaitForCompletionResponse(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(pollingInterval, cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(pollingInterval, cancellationToken); + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppPlatformArmOperationOfT.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppPlatformArmOperationOfT.cs new file mode 100644 index 0000000000000..399a89df15c86 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppPlatformArmOperationOfT.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.AppPlatform +{ +#pragma warning disable SA1649 // File name should match first type name + internal class AppPlatformArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + + /// Initializes a new instance of AppPlatformArmOperation for mocking. + protected AppPlatformArmOperation() + { + } + + internal AppPlatformArmOperation(Response response) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + } + + internal AppPlatformArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(source, pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia); + _operation = new OperationInternal(clientDiagnostics, nextLinkOperation, response, "AppPlatformArmOperation", fallbackStrategy: new ExponentialDelayStrategy()); + } + + /// +#pragma warning disable CA1822 + public override string Id => throw new NotImplementedException(); +#pragma warning restore CA1822 + + /// + public override T Value => _operation.Value; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override Response GetRawResponse() => _operation.RawResponse; + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override Response WaitForCompletion(CancellationToken cancellationToken = default) => _operation.WaitForCompletion(cancellationToken); + + /// + public override Response WaitForCompletion(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletion(pollingInterval, cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppResourceOperationSource.cs new file mode 100644 index 0000000000000..e408bea4cd5dd --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppResourceOperationSource.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 AppResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal AppResourceOperationSource(ArmClient client) + { + _client = client; + } + + AppResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = AppResourceData.DeserializeAppResourceData(document.RootElement); + return new AppResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = AppResourceData.DeserializeAppResourceData(document.RootElement); + return new AppResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/BindingResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/BindingResourceOperationSource.cs new file mode 100644 index 0000000000000..a5d11edd42b8f --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/BindingResourceOperationSource.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 BindingResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal BindingResourceOperationSource(ArmClient client) + { + _client = client; + } + + BindingResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = BindingResourceData.DeserializeBindingResourceData(document.RootElement); + return new BindingResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = BindingResourceData.DeserializeBindingResourceData(document.RootElement); + return new BindingResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/BuildServiceAgentPoolResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/BuildServiceAgentPoolResourceOperationSource.cs new file mode 100644 index 0000000000000..38b835cfe0924 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/BuildServiceAgentPoolResourceOperationSource.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 BuildServiceAgentPoolResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal BuildServiceAgentPoolResourceOperationSource(ArmClient client) + { + _client = client; + } + + BuildServiceAgentPoolResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = BuildServiceAgentPoolResourceData.DeserializeBuildServiceAgentPoolResourceData(document.RootElement); + return new BuildServiceAgentPoolResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = BuildServiceAgentPoolResourceData.DeserializeBuildServiceAgentPoolResourceData(document.RootElement); + return new BuildServiceAgentPoolResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/BuilderResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/BuilderResourceOperationSource.cs new file mode 100644 index 0000000000000..8087507ea069a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/BuilderResourceOperationSource.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 BuilderResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal BuilderResourceOperationSource(ArmClient client) + { + _client = client; + } + + BuilderResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = BuilderResourceData.DeserializeBuilderResourceData(document.RootElement); + return new BuilderResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = BuilderResourceData.DeserializeBuilderResourceData(document.RootElement); + return new BuilderResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/BuildpackBindingResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/BuildpackBindingResourceOperationSource.cs new file mode 100644 index 0000000000000..12fa12a8f9173 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/BuildpackBindingResourceOperationSource.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 BuildpackBindingResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal BuildpackBindingResourceOperationSource(ArmClient client) + { + _client = client; + } + + BuildpackBindingResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = BuildpackBindingResourceData.DeserializeBuildpackBindingResourceData(document.RootElement); + return new BuildpackBindingResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = BuildpackBindingResourceData.DeserializeBuildpackBindingResourceData(document.RootElement); + return new BuildpackBindingResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/CertificateResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/CertificateResourceOperationSource.cs new file mode 100644 index 0000000000000..e8f0c97c9c634 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/CertificateResourceOperationSource.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 CertificateResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal CertificateResourceOperationSource(ArmClient client) + { + _client = client; + } + + CertificateResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = CertificateResourceData.DeserializeCertificateResourceData(document.RootElement); + return new CertificateResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = CertificateResourceData.DeserializeCertificateResourceData(document.RootElement); + return new CertificateResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ConfigServerResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ConfigServerResourceOperationSource.cs new file mode 100644 index 0000000000000..cebb145819167 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ConfigServerResourceOperationSource.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 ConfigServerResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ConfigServerResourceOperationSource(ArmClient client) + { + _client = client; + } + + ConfigServerResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = ConfigServerResourceData.DeserializeConfigServerResourceData(document.RootElement); + return new ConfigServerResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = ConfigServerResourceData.DeserializeConfigServerResourceData(document.RootElement); + return new ConfigServerResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ConfigServerSettingsValidateResultOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ConfigServerSettingsValidateResultOperationSource.cs new file mode 100644 index 0000000000000..f30b37a7f8e73 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ConfigServerSettingsValidateResultOperationSource.cs @@ -0,0 +1,31 @@ +// 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.AppPlatform.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + internal class ConfigServerSettingsValidateResultOperationSource : IOperationSource + { + ConfigServerSettingsValidateResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return ConfigServerSettingsValidateResult.DeserializeConfigServerSettingsValidateResult(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return ConfigServerSettingsValidateResult.DeserializeConfigServerSettingsValidateResult(document.RootElement); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ConfigurationServiceResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ConfigurationServiceResourceOperationSource.cs new file mode 100644 index 0000000000000..dce7ec4ce9e67 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ConfigurationServiceResourceOperationSource.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 ConfigurationServiceResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ConfigurationServiceResourceOperationSource(ArmClient client) + { + _client = client; + } + + ConfigurationServiceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = ConfigurationServiceResourceData.DeserializeConfigurationServiceResourceData(document.RootElement); + return new ConfigurationServiceResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = ConfigurationServiceResourceData.DeserializeConfigurationServiceResourceData(document.RootElement); + return new ConfigurationServiceResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ConfigurationServiceSettingsValidateResultOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ConfigurationServiceSettingsValidateResultOperationSource.cs new file mode 100644 index 0000000000000..265ed84bafe46 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ConfigurationServiceSettingsValidateResultOperationSource.cs @@ -0,0 +1,31 @@ +// 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.AppPlatform.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + internal class ConfigurationServiceSettingsValidateResultOperationSource : IOperationSource + { + ConfigurationServiceSettingsValidateResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return ConfigurationServiceSettingsValidateResult.DeserializeConfigurationServiceSettingsValidateResult(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return ConfigurationServiceSettingsValidateResult.DeserializeConfigurationServiceSettingsValidateResult(document.RootElement); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/CustomDomainResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/CustomDomainResourceOperationSource.cs new file mode 100644 index 0000000000000..5971f611ac909 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/CustomDomainResourceOperationSource.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 CustomDomainResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal CustomDomainResourceOperationSource(ArmClient client) + { + _client = client; + } + + CustomDomainResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = CustomDomainResourceData.DeserializeCustomDomainResourceData(document.RootElement); + return new CustomDomainResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = CustomDomainResourceData.DeserializeCustomDomainResourceData(document.RootElement); + return new CustomDomainResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/DeploymentResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/DeploymentResourceOperationSource.cs new file mode 100644 index 0000000000000..28deca116a291 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/DeploymentResourceOperationSource.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 DeploymentResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DeploymentResourceOperationSource(ArmClient client) + { + _client = client; + } + + DeploymentResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = DeploymentResourceData.DeserializeDeploymentResourceData(document.RootElement); + return new DeploymentResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = DeploymentResourceData.DeserializeDeploymentResourceData(document.RootElement); + return new DeploymentResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/GatewayCustomDomainResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/GatewayCustomDomainResourceOperationSource.cs new file mode 100644 index 0000000000000..dcc1e404fb7c5 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/GatewayCustomDomainResourceOperationSource.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 GatewayCustomDomainResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal GatewayCustomDomainResourceOperationSource(ArmClient client) + { + _client = client; + } + + GatewayCustomDomainResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = GatewayCustomDomainResourceData.DeserializeGatewayCustomDomainResourceData(document.RootElement); + return new GatewayCustomDomainResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = GatewayCustomDomainResourceData.DeserializeGatewayCustomDomainResourceData(document.RootElement); + return new GatewayCustomDomainResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/GatewayResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/GatewayResourceOperationSource.cs new file mode 100644 index 0000000000000..79ba2358b90ec --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/GatewayResourceOperationSource.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 GatewayResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal GatewayResourceOperationSource(ArmClient client) + { + _client = client; + } + + GatewayResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = GatewayResourceData.DeserializeGatewayResourceData(document.RootElement); + return new GatewayResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = GatewayResourceData.DeserializeGatewayResourceData(document.RootElement); + return new GatewayResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/GatewayRouteConfigResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/GatewayRouteConfigResourceOperationSource.cs new file mode 100644 index 0000000000000..78fe2bcbe4b51 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/GatewayRouteConfigResourceOperationSource.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 GatewayRouteConfigResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal GatewayRouteConfigResourceOperationSource(ArmClient client) + { + _client = client; + } + + GatewayRouteConfigResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = GatewayRouteConfigResourceData.DeserializeGatewayRouteConfigResourceData(document.RootElement); + return new GatewayRouteConfigResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = GatewayRouteConfigResourceData.DeserializeGatewayRouteConfigResourceData(document.RootElement); + return new GatewayRouteConfigResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/MonitoringSettingResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/MonitoringSettingResourceOperationSource.cs new file mode 100644 index 0000000000000..2ee7f3d7a953b --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/MonitoringSettingResourceOperationSource.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 MonitoringSettingResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal MonitoringSettingResourceOperationSource(ArmClient client) + { + _client = client; + } + + MonitoringSettingResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = MonitoringSettingResourceData.DeserializeMonitoringSettingResourceData(document.RootElement); + return new MonitoringSettingResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = MonitoringSettingResourceData.DeserializeMonitoringSettingResourceData(document.RootElement); + return new MonitoringSettingResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ServiceRegistryResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ServiceRegistryResourceOperationSource.cs new file mode 100644 index 0000000000000..6c3a9e6db290d --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ServiceRegistryResourceOperationSource.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 ServiceRegistryResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ServiceRegistryResourceOperationSource(ArmClient client) + { + _client = client; + } + + ServiceRegistryResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = ServiceRegistryResourceData.DeserializeServiceRegistryResourceData(document.RootElement); + return new ServiceRegistryResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = ServiceRegistryResourceData.DeserializeServiceRegistryResourceData(document.RootElement); + return new ServiceRegistryResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ServiceResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ServiceResourceOperationSource.cs new file mode 100644 index 0000000000000..4ad51063f56c7 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ServiceResourceOperationSource.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 ServiceResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ServiceResourceOperationSource(ArmClient client) + { + _client = client; + } + + ServiceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = ServiceResourceData.DeserializeServiceResourceData(document.RootElement); + return new ServiceResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = ServiceResourceData.DeserializeServiceResourceData(document.RootElement); + return new ServiceResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/StorageResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/StorageResourceOperationSource.cs new file mode 100644 index 0000000000000..1f318ae1fc365 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/StorageResourceOperationSource.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 StorageResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal StorageResourceOperationSource(ArmClient client) + { + _client = client; + } + + StorageResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = StorageResourceData.DeserializeStorageResourceData(document.RootElement); + return new StorageResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = StorageResourceData.DeserializeStorageResourceData(document.RootElement); + return new StorageResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ActiveDeploymentCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ActiveDeploymentCollection.Serialization.cs new file mode 100644 index 0000000000000..254b08d2a1464 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ActiveDeploymentCollection.Serialization.cs @@ -0,0 +1,31 @@ +// 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 ActiveDeploymentCollection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(ActiveDeploymentNames)) + { + writer.WritePropertyName("activeDeploymentNames"); + writer.WriteStartArray(); + foreach (var item in ActiveDeploymentNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ActiveDeploymentCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ActiveDeploymentCollection.cs new file mode 100644 index 0000000000000..e5e6b8f19069e --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ActiveDeploymentCollection.cs @@ -0,0 +1,25 @@ +// 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 +{ + /// Object that includes an array of Deployment resource name and set them as active. + public partial class ActiveDeploymentCollection + { + /// Initializes a new instance of ActiveDeploymentCollection. + public ActiveDeploymentCollection() + { + ActiveDeploymentNames = new ChangeTrackingList(); + } + + /// Collection of Deployment name. + public IList ActiveDeploymentNames { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainProperties.Serialization.cs new file mode 100644 index 0000000000000..5985af7951e9d --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainProperties.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class ApiPortalCustomDomainProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Thumbprint)) + { + writer.WritePropertyName("thumbprint"); + writer.WriteStringValue(Thumbprint); + } + writer.WriteEndObject(); + } + + internal static ApiPortalCustomDomainProperties DeserializeApiPortalCustomDomainProperties(JsonElement element) + { + Optional thumbprint = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("thumbprint")) + { + thumbprint = property.Value.GetString(); + continue; + } + } + return new ApiPortalCustomDomainProperties(thumbprint.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainProperties.cs new file mode 100644 index 0000000000000..3504891acee26 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainProperties.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// The properties of custom domain for API portal. + internal partial class ApiPortalCustomDomainProperties + { + /// Initializes a new instance of ApiPortalCustomDomainProperties. + public ApiPortalCustomDomainProperties() + { + } + + /// Initializes a new instance of ApiPortalCustomDomainProperties. + /// The thumbprint of bound certificate. + internal ApiPortalCustomDomainProperties(string thumbprint) + { + Thumbprint = thumbprint; + } + + /// The thumbprint of bound certificate. + public string Thumbprint { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainResourceCollection.Serialization.cs new file mode 100644 index 0000000000000..084d2be1f0c11 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainResourceCollection.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class ApiPortalCustomDomainResourceCollection + { + internal static ApiPortalCustomDomainResourceCollection DeserializeApiPortalCustomDomainResourceCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ApiPortalCustomDomainResourceData.DeserializeApiPortalCustomDomainResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new ApiPortalCustomDomainResourceCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainResourceCollection.cs new file mode 100644 index 0000000000000..b7e3f9f28e7cc --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainResourceCollection.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 API portal custom domain resources and a possible link for next set. + internal partial class ApiPortalCustomDomainResourceCollection + { + /// Initializes a new instance of ApiPortalCustomDomainResourceCollection. + internal ApiPortalCustomDomainResourceCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of ApiPortalCustomDomainResourceCollection. + /// Collection of API portal custom domain resources. + /// + /// URL client should use to fetch the next page (per server side paging). + /// It's null for now, added for future use. + /// + internal ApiPortalCustomDomainResourceCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of API portal custom domain 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/ApiPortalCustomDomainResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainResourceData.Serialization.cs new file mode 100644 index 0000000000000..f6c0c46e30a4a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainResourceData.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; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + public partial class ApiPortalCustomDomainResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + + internal static ApiPortalCustomDomainResourceData DeserializeApiPortalCustomDomainResourceData(JsonElement element) + { + Optional properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = ApiPortalCustomDomainProperties.DeserializeApiPortalCustomDomainProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new ApiPortalCustomDomainResourceData(id, name, type, systemData, properties.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalInstance.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalInstance.Serialization.cs new file mode 100644 index 0000000000000..28b85f8163965 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalInstance.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class ApiPortalInstance + { + internal static ApiPortalInstance DeserializeApiPortalInstance(JsonElement element) + { + Optional name = default; + Optional status = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("status")) + { + status = property.Value.GetString(); + continue; + } + } + return new ApiPortalInstance(name.Value, status.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalInstance.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalInstance.cs new file mode 100644 index 0000000000000..9f97a50d9172d --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalInstance.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 API portal. + public partial class ApiPortalInstance + { + /// Initializes a new instance of ApiPortalInstance. + internal ApiPortalInstance() + { + } + + /// Initializes a new instance of ApiPortalInstance. + /// Name of the API portal instance. + /// Status of the API portal instance. + internal ApiPortalInstance(string name, string status) + { + Name = name; + Status = status; + } + + /// Name of the API portal instance. + public string Name { get; } + /// Status of the API portal instance. + public string Status { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalProperties.Serialization.cs new file mode 100644 index 0000000000000..a478db9d459e8 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalProperties.Serialization.cs @@ -0,0 +1,180 @@ +// 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 ApiPortalProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Public)) + { + writer.WritePropertyName("public"); + writer.WriteBooleanValue(Public.Value); + } + if (Optional.IsDefined(HttpsOnly)) + { + writer.WritePropertyName("httpsOnly"); + writer.WriteBooleanValue(HttpsOnly.Value); + } + if (Optional.IsCollectionDefined(GatewayIds)) + { + writer.WritePropertyName("gatewayIds"); + writer.WriteStartArray(); + foreach (var item in GatewayIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(SourceUrls)) + { + writer.WritePropertyName("sourceUrls"); + writer.WriteStartArray(); + foreach (var item in SourceUrls) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(SsoProperties)) + { + writer.WritePropertyName("ssoProperties"); + writer.WriteObjectValue(SsoProperties); + } + writer.WriteEndObject(); + } + + internal static ApiPortalProperties DeserializeApiPortalProperties(JsonElement element) + { + Optional provisioningState = default; + Optional @public = default; + Optional url = default; + Optional httpsOnly = default; + Optional> gatewayIds = default; + Optional> sourceUrls = default; + Optional ssoProperties = default; + Optional resourceRequests = default; + Optional> instances = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new ApiPortalProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("public")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + @public = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("url")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + url = null; + continue; + } + url = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("httpsOnly")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + httpsOnly = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("gatewayIds")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + gatewayIds = array; + continue; + } + if (property.NameEquals("sourceUrls")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + sourceUrls = array; + continue; + } + if (property.NameEquals("ssoProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + ssoProperties = SsoProperties.DeserializeSsoProperties(property.Value); + continue; + } + if (property.NameEquals("resourceRequests")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + resourceRequests = ApiPortalResourceRequests.DeserializeApiPortalResourceRequests(property.Value); + continue; + } + if (property.NameEquals("instances")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ApiPortalInstance.DeserializeApiPortalInstance(item)); + } + instances = array; + continue; + } + } + return new ApiPortalProperties(Optional.ToNullable(provisioningState), Optional.ToNullable(@public), url.Value, Optional.ToNullable(httpsOnly), Optional.ToList(gatewayIds), Optional.ToList(sourceUrls), ssoProperties.Value, resourceRequests.Value, Optional.ToList(instances)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalProperties.cs new file mode 100644 index 0000000000000..700bfad582d08 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalProperties.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 Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// API portal properties payload. + public partial class ApiPortalProperties + { + /// Initializes a new instance of ApiPortalProperties. + public ApiPortalProperties() + { + GatewayIds = new ChangeTrackingList(); + SourceUrls = new ChangeTrackingList(); + Instances = new ChangeTrackingList(); + } + + /// Initializes a new instance of ApiPortalProperties. + /// State of the API portal. + /// Indicates whether the API portal exposes endpoint. + /// URL of the API portal, exposed when 'public' is true. + /// Indicate if only https is allowed. + /// The array of resource Ids of gateway to integrate with API portal. + /// Collection of OpenAPI source URL locations. + /// Single sign-on related configuration. + /// The requested resource quantity for required CPU and Memory. + /// Collection of instances belong to API portal. + internal ApiPortalProperties(ApiPortalProvisioningState? provisioningState, bool? @public, Uri uri, bool? httpsOnly, IList gatewayIds, IList sourceUrls, SsoProperties ssoProperties, ApiPortalResourceRequests resourceRequests, IReadOnlyList instances) + { + ProvisioningState = provisioningState; + Public = @public; + Uri = uri; + HttpsOnly = httpsOnly; + GatewayIds = gatewayIds; + SourceUrls = sourceUrls; + SsoProperties = ssoProperties; + ResourceRequests = resourceRequests; + Instances = instances; + } + + /// State of the API portal. + public ApiPortalProvisioningState? ProvisioningState { get; } + /// Indicates whether the API portal exposes endpoint. + public bool? Public { get; set; } + /// URL of the API portal, exposed when 'public' is true. + public Uri Uri { get; } + /// Indicate if only https is allowed. + public bool? HttpsOnly { get; set; } + /// The array of resource Ids of gateway to integrate with API portal. + public IList GatewayIds { get; } + /// Collection of OpenAPI source URL locations. + public IList SourceUrls { get; } + /// Single sign-on related configuration. + public SsoProperties SsoProperties { get; set; } + /// The requested resource quantity for required CPU and Memory. + public ApiPortalResourceRequests ResourceRequests { get; } + /// Collection of instances belong to API portal. + public IReadOnlyList Instances { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalProvisioningState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalProvisioningState.cs new file mode 100644 index 0000000000000..ac293b88371f7 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalProvisioningState.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 API portal. + public readonly partial struct ApiPortalProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ApiPortalProvisioningState(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 ApiPortalProvisioningState Creating { get; } = new ApiPortalProvisioningState(CreatingValue); + /// Updating. + public static ApiPortalProvisioningState Updating { get; } = new ApiPortalProvisioningState(UpdatingValue); + /// Succeeded. + public static ApiPortalProvisioningState Succeeded { get; } = new ApiPortalProvisioningState(SucceededValue); + /// Failed. + public static ApiPortalProvisioningState Failed { get; } = new ApiPortalProvisioningState(FailedValue); + /// Deleting. + public static ApiPortalProvisioningState Deleting { get; } = new ApiPortalProvisioningState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(ApiPortalProvisioningState left, ApiPortalProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ApiPortalProvisioningState left, ApiPortalProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ApiPortalProvisioningState(string value) => new ApiPortalProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ApiPortalProvisioningState other && Equals(other); + /// + public bool Equals(ApiPortalProvisioningState 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/ApiPortalResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceCollection.Serialization.cs new file mode 100644 index 0000000000000..77899a28df189 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceCollection.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class ApiPortalResourceCollection + { + internal static ApiPortalResourceCollection DeserializeApiPortalResourceCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ApiPortalResourceData.DeserializeApiPortalResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new ApiPortalResourceCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceCollection.cs new file mode 100644 index 0000000000000..a620d523fd4a6 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceCollection.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 API portal resources and a possible link for next set. + internal partial class ApiPortalResourceCollection + { + /// Initializes a new instance of ApiPortalResourceCollection. + internal ApiPortalResourceCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of ApiPortalResourceCollection. + /// Collection of API 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 ApiPortalResourceCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of API 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/ApiPortalResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceData.Serialization.cs new file mode 100644 index 0000000000000..58d7190f1a105 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceData.Serialization.cs @@ -0,0 +1,87 @@ +// 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 ApiPortalResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"); + writer.WriteObjectValue(Sku); + } + writer.WriteEndObject(); + } + + internal static ApiPortalResourceData DeserializeApiPortalResourceData(JsonElement element) + { + Optional properties = default; + Optional sku = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = ApiPortalProperties.DeserializeApiPortalProperties(property.Value); + continue; + } + if (property.NameEquals("sku")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sku = AppPlatformSku.DeserializeAppPlatformSku(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new ApiPortalResourceData(id, name, type, systemData, properties.Value, sku.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceRequests.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceRequests.Serialization.cs new file mode 100644 index 0000000000000..40b30171ee620 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceRequests.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class ApiPortalResourceRequests + { + internal static ApiPortalResourceRequests DeserializeApiPortalResourceRequests(JsonElement element) + { + Optional cpu = default; + Optional memory = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("cpu")) + { + cpu = property.Value.GetString(); + continue; + } + if (property.NameEquals("memory")) + { + memory = property.Value.GetString(); + continue; + } + } + return new ApiPortalResourceRequests(cpu.Value, memory.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceRequests.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceRequests.cs new file mode 100644 index 0000000000000..449dbe62e1ed4 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceRequests.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Resource requests of the API portal. + public partial class ApiPortalResourceRequests + { + /// Initializes a new instance of ApiPortalResourceRequests. + internal ApiPortalResourceRequests() + { + } + + /// Initializes a new instance of ApiPortalResourceRequests. + /// Cpu allocated to each API portal instance. + /// Memory allocated to each API portal instance. + internal ApiPortalResourceRequests(string cpu, string memory) + { + Cpu = cpu; + Memory = memory; + } + + /// Cpu allocated to each API portal instance. + public string Cpu { get; } + /// Memory allocated to each API portal instance. + public string Memory { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformSku.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformSku.Serialization.cs new file mode 100644 index 0000000000000..38a708ba528bd --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformSku.Serialization.cs @@ -0,0 +1,67 @@ +// 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 AppPlatformSku : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Tier)) + { + writer.WritePropertyName("tier"); + writer.WriteStringValue(Tier); + } + if (Optional.IsDefined(Capacity)) + { + writer.WritePropertyName("capacity"); + writer.WriteNumberValue(Capacity.Value); + } + writer.WriteEndObject(); + } + + internal static AppPlatformSku DeserializeAppPlatformSku(JsonElement element) + { + Optional name = default; + Optional tier = default; + Optional capacity = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("tier")) + { + tier = property.Value.GetString(); + continue; + } + if (property.NameEquals("capacity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + capacity = property.Value.GetInt32(); + continue; + } + } + return new AppPlatformSku(name.Value, tier.Value, Optional.ToNullable(capacity)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformSku.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformSku.cs new file mode 100644 index 0000000000000..e75a674fd9fe4 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformSku.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Sku of Azure Spring Cloud. + public partial class AppPlatformSku + { + /// Initializes a new instance of AppPlatformSku. + public AppPlatformSku() + { + } + + /// Initializes a new instance of AppPlatformSku. + /// Name of the Sku. + /// Tier of the Sku. + /// Current capacity of the target resource. + internal AppPlatformSku(string name, string tier, int? capacity) + { + Name = name; + Tier = tier; + Capacity = capacity; + } + + /// Name of the Sku. + public string Name { get; set; } + /// Tier of the Sku. + public string Tier { get; set; } + /// Current capacity of the target resource. + public int? Capacity { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceCollection.Serialization.cs new file mode 100644 index 0000000000000..cd0a63d24286a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceCollection.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class AppResourceCollection + { + internal static AppResourceCollection DeserializeAppResourceCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AppResourceData.DeserializeAppResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new AppResourceCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceCollection.cs new file mode 100644 index 0000000000000..8269a4b2bc615 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceCollection.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 App resources and a possible link for next set. + internal partial class AppResourceCollection + { + /// Initializes a new instance of AppResourceCollection. + internal AppResourceCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of AppResourceCollection. + /// Collection of App resources. + /// + /// URL client should use to fetch the next page (per server side paging). + /// It's null for now, added for future use. + /// + internal AppResourceCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of App 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/AppResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceData.Serialization.cs new file mode 100644 index 0000000000000..c1ba29d543c0c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceData.Serialization.cs @@ -0,0 +1,105 @@ +// 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 AppResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"); + writer.WriteStringValue(Location.Value); + } + writer.WriteEndObject(); + } + + internal static AppResourceData DeserializeAppResourceData(JsonElement element) + { + Optional properties = default; + Optional identity = default; + Optional location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = AppResourceProperties.DeserializeAppResourceProperties(property.Value); + continue; + } + if (property.NameEquals("identity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.ToString(), serializeOptions); + continue; + } + if (property.NameEquals("location")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new AppResourceData(id, name, type, systemData, properties.Value, identity, Optional.ToNullable(location)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProperties.Serialization.cs new file mode 100644 index 0000000000000..af33687b4d997 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProperties.Serialization.cs @@ -0,0 +1,238 @@ +// 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 AppResourceProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Public)) + { + writer.WritePropertyName("public"); + writer.WriteBooleanValue(Public.Value); + } + if (Optional.IsCollectionDefined(AddonConfigs)) + { + writer.WritePropertyName("addonConfigs"); + writer.WriteStartObject(); + foreach (var item in AddonConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteStartObject(); + foreach (var item0 in item.Value) + { + writer.WritePropertyName(item0.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item0.Value); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(item0.Value.ToString()).RootElement); +#endif + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Fqdn)) + { + writer.WritePropertyName("fqdn"); + writer.WriteStringValue(Fqdn); + } + if (Optional.IsDefined(HttpsOnly)) + { + writer.WritePropertyName("httpsOnly"); + writer.WriteBooleanValue(HttpsOnly.Value); + } + if (Optional.IsDefined(TemporaryDisk)) + { + writer.WritePropertyName("temporaryDisk"); + writer.WriteObjectValue(TemporaryDisk); + } + if (Optional.IsDefined(PersistentDisk)) + { + writer.WritePropertyName("persistentDisk"); + writer.WriteObjectValue(PersistentDisk); + } + if (Optional.IsCollectionDefined(CustomPersistentDisks)) + { + writer.WritePropertyName("customPersistentDisks"); + writer.WriteStartArray(); + foreach (var item in CustomPersistentDisks) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(EnableEndToEndTLS)) + { + writer.WritePropertyName("enableEndToEndTLS"); + writer.WriteBooleanValue(EnableEndToEndTLS.Value); + } + if (Optional.IsCollectionDefined(LoadedCertificates)) + { + writer.WritePropertyName("loadedCertificates"); + writer.WriteStartArray(); + foreach (var item in LoadedCertificates) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static AppResourceProperties DeserializeAppResourceProperties(JsonElement element) + { + Optional @public = default; + Optional url = default; + Optional>> addonConfigs = default; + Optional provisioningState = default; + Optional fqdn = default; + Optional httpsOnly = default; + Optional temporaryDisk = default; + Optional persistentDisk = default; + Optional> customPersistentDisks = default; + Optional enableEndToEndTLS = default; + Optional> loadedCertificates = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("public")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + @public = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("url")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + url = null; + continue; + } + url = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("addonConfigs")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary> dictionary = new Dictionary>(); + foreach (var property0 in property.Value.EnumerateObject()) + { + Dictionary dictionary0 = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary0.Add(property1.Name, BinaryData.FromString(property1.Value.GetRawText())); + } + dictionary.Add(property0.Name, dictionary0); + } + addonConfigs = dictionary; + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new AppResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("fqdn")) + { + fqdn = property.Value.GetString(); + continue; + } + if (property.NameEquals("httpsOnly")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + httpsOnly = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("temporaryDisk")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + temporaryDisk = TemporaryDisk.DeserializeTemporaryDisk(property.Value); + continue; + } + if (property.NameEquals("persistentDisk")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + persistentDisk = PersistentDisk.DeserializePersistentDisk(property.Value); + continue; + } + if (property.NameEquals("customPersistentDisks")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CustomPersistentDiskResource.DeserializeCustomPersistentDiskResource(item)); + } + customPersistentDisks = array; + continue; + } + if (property.NameEquals("enableEndToEndTLS")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + enableEndToEndTLS = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("loadedCertificates")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(LoadedCertificate.DeserializeLoadedCertificate(item)); + } + loadedCertificates = array; + continue; + } + } + return new AppResourceProperties(Optional.ToNullable(@public), url.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)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProperties.cs new file mode 100644 index 0000000000000..894cca8e5f48c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProperties.cs @@ -0,0 +1,75 @@ +// 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 +{ + /// App resource properties payload. + public partial class AppResourceProperties + { + /// Initializes a new instance of AppResourceProperties. + public AppResourceProperties() + { + AddonConfigs = new ChangeTrackingDictionary>(); + CustomPersistentDisks = new ChangeTrackingList(); + LoadedCertificates = new ChangeTrackingList(); + } + + /// Initializes a new instance of AppResourceProperties. + /// Indicates whether the App exposes public endpoint. + /// URL of the App. + /// Collection of addons. + /// Provisioning state of the App. + /// Fully qualified dns Name. + /// Indicate if only https is allowed. + /// Temporary disk settings. + /// Persistent disk settings. + /// List of custom persistent disks. + /// Indicate if end to end TLS is enabled. + /// Collection of loaded certificates. + internal AppResourceProperties(bool? @public, Uri uri, IDictionary> addonConfigs, AppResourceProvisioningState? provisioningState, string fqdn, bool? httpsOnly, TemporaryDisk temporaryDisk, PersistentDisk persistentDisk, IList customPersistentDisks, bool? enableEndToEndTLS, IList loadedCertificates) + { + Public = @public; + Uri = uri; + AddonConfigs = addonConfigs; + ProvisioningState = provisioningState; + Fqdn = fqdn; + HttpsOnly = httpsOnly; + TemporaryDisk = temporaryDisk; + PersistentDisk = persistentDisk; + CustomPersistentDisks = customPersistentDisks; + EnableEndToEndTLS = enableEndToEndTLS; + LoadedCertificates = loadedCertificates; + } + + /// Indicates whether the App exposes public endpoint. + public bool? Public { get; set; } + /// URL of the App. + public Uri Uri { get; } + /// Collection of addons. + public IDictionary> AddonConfigs { get; } + /// Provisioning state of the App. + public AppResourceProvisioningState? ProvisioningState { get; } + /// Fully qualified dns Name. + public string Fqdn { get; set; } + /// Indicate if only https is allowed. + public bool? HttpsOnly { get; set; } + /// Temporary disk settings. + public TemporaryDisk TemporaryDisk { get; set; } + /// Persistent disk settings. + public PersistentDisk PersistentDisk { get; set; } + /// List of custom persistent disks. + public IList CustomPersistentDisks { get; } + /// Indicate if end to end TLS is enabled. + public bool? EnableEndToEndTLS { get; set; } + /// Collection of loaded certificates. + public IList LoadedCertificates { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProvisioningState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProvisioningState.cs new file mode 100644 index 0000000000000..e54ef3a1e2218 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProvisioningState.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 +{ + /// Provisioning state of the App. + public readonly partial struct AppResourceProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AppResourceProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CreatingValue = "Creating"; + private const string UpdatingValue = "Updating"; + private const string DeletingValue = "Deleting"; + + /// Succeeded. + public static AppResourceProvisioningState Succeeded { get; } = new AppResourceProvisioningState(SucceededValue); + /// Failed. + public static AppResourceProvisioningState Failed { get; } = new AppResourceProvisioningState(FailedValue); + /// Creating. + public static AppResourceProvisioningState Creating { get; } = new AppResourceProvisioningState(CreatingValue); + /// Updating. + public static AppResourceProvisioningState Updating { get; } = new AppResourceProvisioningState(UpdatingValue); + /// Deleting. + public static AppResourceProvisioningState Deleting { get; } = new AppResourceProvisioningState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(AppResourceProvisioningState left, AppResourceProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AppResourceProvisioningState left, AppResourceProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AppResourceProvisioningState(string value) => new AppResourceProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AppResourceProvisioningState other && Equals(other); + /// + public bool Equals(AppResourceProvisioningState 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/ApplicationInsightsAgentVersions.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationInsightsAgentVersions.Serialization.cs new file mode 100644 index 0000000000000..4dc524eb16619 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationInsightsAgentVersions.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class ApplicationInsightsAgentVersions : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WriteEndObject(); + } + + internal static ApplicationInsightsAgentVersions DeserializeApplicationInsightsAgentVersions(JsonElement element) + { + Optional java = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("java")) + { + java = property.Value.GetString(); + continue; + } + } + return new ApplicationInsightsAgentVersions(java.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationInsightsAgentVersions.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationInsightsAgentVersions.cs new file mode 100644 index 0000000000000..b39c986bcb5ef --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApplicationInsightsAgentVersions.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Application Insights agent versions properties payload. + internal partial class ApplicationInsightsAgentVersions + { + /// Initializes a new instance of ApplicationInsightsAgentVersions. + public ApplicationInsightsAgentVersions() + { + } + + /// Initializes a new instance of ApplicationInsightsAgentVersions. + /// Indicates the version of application insight java agent. + internal ApplicationInsightsAgentVersions(string java) + { + Java = java; + } + + /// Indicates the version of application insight java agent. + public string Java { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AvailableRuntimeVersions.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AvailableRuntimeVersions.Serialization.cs new file mode 100644 index 0000000000000..630f3c336a0fb --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AvailableRuntimeVersions.Serialization.cs @@ -0,0 +1,40 @@ +// 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 +{ + internal partial class AvailableRuntimeVersions + { + internal static AvailableRuntimeVersions DeserializeAvailableRuntimeVersions(JsonElement element) + { + Optional> value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SupportedRuntimeVersion.DeserializeSupportedRuntimeVersion(item)); + } + value = array; + continue; + } + } + return new AvailableRuntimeVersions(Optional.ToList(value)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AvailableRuntimeVersions.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AvailableRuntimeVersions.cs new file mode 100644 index 0000000000000..a4b878582767a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AvailableRuntimeVersions.cs @@ -0,0 +1,32 @@ +// 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 AvailableRuntimeVersions. + internal partial class AvailableRuntimeVersions + { + /// Initializes a new instance of AvailableRuntimeVersions. + internal AvailableRuntimeVersions() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of AvailableRuntimeVersions. + /// A list of all supported runtime versions. + internal AvailableRuntimeVersions(IReadOnlyList value) + { + Value = value; + } + + /// A list of all supported runtime versions. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AzureFileVolume.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AzureFileVolume.Serialization.cs new file mode 100644 index 0000000000000..5883d65753d9b --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AzureFileVolume.Serialization.cs @@ -0,0 +1,96 @@ +// 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 AzureFileVolume : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("shareName"); + writer.WriteStringValue(ShareName); + writer.WritePropertyName("type"); + writer.WriteStringValue(UnderlyingResourceType.ToString()); + writer.WritePropertyName("mountPath"); + writer.WriteStringValue(MountPath); + if (Optional.IsDefined(ReadOnly)) + { + writer.WritePropertyName("readOnly"); + writer.WriteBooleanValue(ReadOnly.Value); + } + if (Optional.IsCollectionDefined(MountOptions)) + { + writer.WritePropertyName("mountOptions"); + writer.WriteStartArray(); + foreach (var item in MountOptions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static AzureFileVolume DeserializeAzureFileVolume(JsonElement element) + { + string shareName = default; + UnderlyingResourceType type = default; + string mountPath = default; + Optional readOnly = default; + Optional> mountOptions = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("shareName")) + { + shareName = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new UnderlyingResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("mountPath")) + { + mountPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("readOnly")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + readOnly = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("mountOptions")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + mountOptions = array; + continue; + } + } + return new AzureFileVolume(type, mountPath, Optional.ToNullable(readOnly), Optional.ToList(mountOptions), shareName); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AzureFileVolume.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AzureFileVolume.cs new file mode 100644 index 0000000000000..b52573b760964 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AzureFileVolume.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// The properties of the Azure File volume. Azure File shares are mounted as volumes. + public partial class AzureFileVolume : CustomPersistentDiskProperties + { + /// Initializes a new instance of AzureFileVolume. + /// The mount path of the persistent disk. + /// The share name of the Azure File share. + /// or is null. + public AzureFileVolume(string mountPath, string shareName) : base(mountPath) + { + if (mountPath == null) + { + throw new ArgumentNullException(nameof(mountPath)); + } + if (shareName == null) + { + throw new ArgumentNullException(nameof(shareName)); + } + + ShareName = shareName; + UnderlyingResourceType = UnderlyingResourceType.AzureFileVolume; + } + + /// Initializes a new instance of AzureFileVolume. + /// 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. + /// These are the mount options for a persistent disk. + /// The share name of the Azure File share. + internal AzureFileVolume(UnderlyingResourceType underlyingResourceType, string mountPath, bool? readOnly, IList mountOptions, string shareName) : base(underlyingResourceType, mountPath, readOnly, mountOptions) + { + ShareName = shareName; + UnderlyingResourceType = underlyingResourceType; + } + + /// The share name of the Azure File share. + public string ShareName { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceCollection.Serialization.cs new file mode 100644 index 0000000000000..d157c8339f6e6 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceCollection.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class BindingResourceCollection + { + internal static BindingResourceCollection DeserializeBindingResourceCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BindingResourceData.DeserializeBindingResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new BindingResourceCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceCollection.cs new file mode 100644 index 0000000000000..8e47e9453a012 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceCollection.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 Binding resources and a possible link for next set. + internal partial class BindingResourceCollection + { + /// Initializes a new instance of BindingResourceCollection. + internal BindingResourceCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of BindingResourceCollection. + /// Collection of Binding resources. + /// + /// URL client should use to fetch the next page (per server side paging). + /// It's null for now, added for future use. + /// + internal BindingResourceCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of Binding 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/BindingResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceData.Serialization.cs new file mode 100644 index 0000000000000..171e832b27531 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceData.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; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + public partial class BindingResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + + internal static BindingResourceData DeserializeBindingResourceData(JsonElement element) + { + Optional properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = BindingResourceProperties.DeserializeBindingResourceProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new BindingResourceData(id, name, type, systemData, properties.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceProperties.Serialization.cs new file mode 100644 index 0000000000000..e634685134edf --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceProperties.Serialization.cs @@ -0,0 +1,119 @@ +// 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 BindingResourceProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"); + writer.WriteStringValue(ResourceId); + } + if (Optional.IsDefined(Key)) + { + writer.WritePropertyName("key"); + writer.WriteStringValue(Key); + } + if (Optional.IsCollectionDefined(BindingParameters)) + { + writer.WritePropertyName("bindingParameters"); + writer.WriteStartObject(); + foreach (var item in BindingParameters) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); +#endif + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static BindingResourceProperties DeserializeBindingResourceProperties(JsonElement element) + { + Optional resourceName = default; + Optional resourceType = default; + Optional resourceId = default; + Optional key = default; + Optional> bindingParameters = default; + Optional generatedProperties = default; + Optional createdAt = default; + Optional updatedAt = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceName")) + { + resourceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceType")) + { + resourceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("key")) + { + key = property.Value.GetString(); + continue; + } + if (property.NameEquals("bindingParameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + bindingParameters = dictionary; + continue; + } + if (property.NameEquals("generatedProperties")) + { + generatedProperties = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdAt")) + { + createdAt = property.Value.GetString(); + continue; + } + if (property.NameEquals("updatedAt")) + { + updatedAt = property.Value.GetString(); + continue; + } + } + return new BindingResourceProperties(resourceName.Value, resourceType.Value, resourceId.Value, key.Value, Optional.ToDictionary(bindingParameters), generatedProperties.Value, createdAt.Value, updatedAt.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceProperties.cs new file mode 100644 index 0000000000000..a3db18ae388ab --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceProperties.cs @@ -0,0 +1,61 @@ +// 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 +{ + /// Binding resource properties payload. + public partial class BindingResourceProperties + { + /// Initializes a new instance of BindingResourceProperties. + public BindingResourceProperties() + { + BindingParameters = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of BindingResourceProperties. + /// The name of the bound resource. + /// The standard Azure resource type of the bound resource. + /// The Azure resource id of the bound resource. + /// The key of the bound resource. + /// Binding parameters of the Binding resource. + /// 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 BindingResourceProperties(string resourceName, string resourceType, ResourceIdentifier resourceId, string key, IDictionary bindingParameters, string generatedProperties, string createdAt, string updatedAt) + { + ResourceName = resourceName; + ResourceType = resourceType; + ResourceId = resourceId; + Key = key; + BindingParameters = bindingParameters; + GeneratedProperties = generatedProperties; + CreatedAt = createdAt; + UpdatedAt = updatedAt; + } + + /// The name of the bound resource. + public string ResourceName { get; } + /// The standard Azure resource type of the bound resource. + public string ResourceType { get; } + /// The Azure resource id of the bound resource. + public ResourceIdentifier ResourceId { get; set; } + /// The key of the bound resource. + public string Key { get; set; } + /// 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. + public string CreatedAt { get; } + /// Update time of the Binding resource. + public string UpdatedAt { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingType.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingType.cs new file mode 100644 index 0000000000000..f5aab3a2406a1 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingType.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 +{ + /// Buildpack Binding Type. + public readonly partial struct BindingType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BindingType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ApplicationInsightsValue = "ApplicationInsights"; + private const string ApacheSkyWalkingValue = "ApacheSkyWalking"; + private const string AppDynamicsValue = "AppDynamics"; + private const string DynatraceValue = "Dynatrace"; + private const string NewRelicValue = "NewRelic"; + private const string ElasticAPMValue = "ElasticAPM"; + + /// ApplicationInsights. + public static BindingType ApplicationInsights { get; } = new BindingType(ApplicationInsightsValue); + /// ApacheSkyWalking. + public static BindingType ApacheSkyWalking { get; } = new BindingType(ApacheSkyWalkingValue); + /// AppDynamics. + public static BindingType AppDynamics { get; } = new BindingType(AppDynamicsValue); + /// Dynatrace. + public static BindingType Dynatrace { get; } = new BindingType(DynatraceValue); + /// NewRelic. + public static BindingType NewRelic { get; } = new BindingType(NewRelicValue); + /// ElasticAPM. + public static BindingType ElasticAPM { get; } = new BindingType(ElasticAPMValue); + /// Determines if two values are the same. + public static bool operator ==(BindingType left, BindingType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BindingType left, BindingType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BindingType(string value) => new BindingType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BindingType other && Equals(other); + /// + public bool Equals(BindingType 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/BuildCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildCollection.Serialization.cs new file mode 100644 index 0000000000000..03afe7bbcdf80 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildCollection.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class BuildCollection + { + internal static BuildCollection DeserializeBuildCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BuildData.DeserializeBuildData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new BuildCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildCollection.cs new file mode 100644 index 0000000000000..f66c0575f13cf --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildCollection.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 Build resources and a possible link for next set. + internal partial class BuildCollection + { + /// Initializes a new instance of BuildCollection. + internal BuildCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of BuildCollection. + /// Collection of Build resources. + /// + /// URL client should use to fetch the next page (per server side paging). + /// It's null for now, added for future use. + /// + internal BuildCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of Build 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/BuildData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildData.Serialization.cs new file mode 100644 index 0000000000000..cfbf93987e112 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildData.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; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + public partial class BuildData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + + internal static BuildData DeserializeBuildData(JsonElement element) + { + Optional properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = BuildProperties.DeserializeBuildProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new BuildData(id, name, type, systemData, properties.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildProperties.Serialization.cs new file mode 100644 index 0000000000000..55e794d4eba23 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildProperties.Serialization.cs @@ -0,0 +1,113 @@ +// 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.Resources.Models; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class BuildProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(RelativePath)) + { + writer.WritePropertyName("relativePath"); + writer.WriteStringValue(RelativePath); + } + if (Optional.IsDefined(Builder)) + { + writer.WritePropertyName("builder"); + writer.WriteStringValue(Builder); + } + if (Optional.IsDefined(AgentPool)) + { + writer.WritePropertyName("agentPool"); + writer.WriteStringValue(AgentPool); + } + if (Optional.IsCollectionDefined(Env)) + { + writer.WritePropertyName("env"); + writer.WriteStartObject(); + foreach (var item in Env) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static BuildProperties DeserializeBuildProperties(JsonElement element) + { + Optional relativePath = default; + Optional builder = default; + Optional agentPool = default; + Optional provisioningState = default; + Optional> env = default; + Optional triggeredBuildResult = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("relativePath")) + { + relativePath = property.Value.GetString(); + continue; + } + if (property.NameEquals("builder")) + { + builder = property.Value.GetString(); + continue; + } + if (property.NameEquals("agentPool")) + { + agentPool = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new BuildProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("env")) + { + 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()); + } + env = dictionary; + continue; + } + if (property.NameEquals("triggeredBuildResult")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + triggeredBuildResult = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new BuildProperties(relativePath.Value, builder.Value, agentPool.Value, Optional.ToNullable(provisioningState), Optional.ToDictionary(env), triggeredBuildResult); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildProperties.cs new file mode 100644 index 0000000000000..3ef18b9b3bc0f --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildProperties.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Build resource properties payload. + public partial class BuildProperties + { + /// Initializes a new instance of BuildProperties. + public BuildProperties() + { + Env = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of BuildProperties. + /// The relative path of source code. + /// The resource id of builder to build the source code. + /// The resource id of agent pool. + /// Provisioning state of the KPack build result. + /// The environment variables for this build. + /// The build result triggered by this build. + internal BuildProperties(string relativePath, string builder, string agentPool, BuildProvisioningState? provisioningState, IDictionary env, SubResource triggeredBuildResult) + { + RelativePath = relativePath; + Builder = builder; + AgentPool = agentPool; + ProvisioningState = provisioningState; + Env = env; + TriggeredBuildResult = triggeredBuildResult; + } + + /// The relative path of source code. + public string RelativePath { get; set; } + /// The resource id of builder to build the source code. + public string Builder { get; set; } + /// The resource id of agent pool. + public string AgentPool { get; set; } + /// Provisioning state of the KPack build result. + public BuildProvisioningState? ProvisioningState { get; } + /// The environment variables for this build. + public IDictionary Env { get; } + /// The build result triggered by this build. + internal SubResource TriggeredBuildResult { get; } + /// Gets Id. + public ResourceIdentifier TriggeredBuildResultId + { + get => TriggeredBuildResult?.Id; + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildProvisioningState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildProvisioningState.cs new file mode 100644 index 0000000000000..a4eeb537185c3 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildProvisioningState.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 +{ + /// Provisioning state of the KPack build result. + public readonly partial struct BuildProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BuildProvisioningState(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 BuildProvisioningState Creating { get; } = new BuildProvisioningState(CreatingValue); + /// Updating. + public static BuildProvisioningState Updating { get; } = new BuildProvisioningState(UpdatingValue); + /// Succeeded. + public static BuildProvisioningState Succeeded { get; } = new BuildProvisioningState(SucceededValue); + /// Failed. + public static BuildProvisioningState Failed { get; } = new BuildProvisioningState(FailedValue); + /// Deleting. + public static BuildProvisioningState Deleting { get; } = new BuildProvisioningState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(BuildProvisioningState left, BuildProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BuildProvisioningState left, BuildProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BuildProvisioningState(string value) => new BuildProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BuildProvisioningState other && Equals(other); + /// + public bool Equals(BuildProvisioningState 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/BuildResultCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultCollection.Serialization.cs new file mode 100644 index 0000000000000..a8f5ba95c89bd --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultCollection.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class BuildResultCollection + { + internal static BuildResultCollection DeserializeBuildResultCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BuildResultData.DeserializeBuildResultData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new BuildResultCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultCollection.cs new file mode 100644 index 0000000000000..18536d45ca7be --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultCollection.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 Build result resources and a possible link for next set. + internal partial class BuildResultCollection + { + /// Initializes a new instance of BuildResultCollection. + internal BuildResultCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of BuildResultCollection. + /// Collection of Build result resources. + /// + /// URL client should use to fetch the next page (per server side paging). + /// It's null for now, added for future use. + /// + internal BuildResultCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of Build result 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/BuildResultData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultData.Serialization.cs new file mode 100644 index 0000000000000..7f52fc54c4378 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultData.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; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + public partial class BuildResultData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + + internal static BuildResultData DeserializeBuildResultData(JsonElement element) + { + Optional properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = BuildResultProperties.DeserializeBuildResultProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new BuildResultData(id, name, type, systemData, properties.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultLog.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultLog.Serialization.cs new file mode 100644 index 0000000000000..b7a284da44ab6 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultLog.Serialization.cs @@ -0,0 +1,35 @@ +// 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 BuildResultLog + { + internal static BuildResultLog DeserializeBuildResultLog(JsonElement element) + { + Optional blobUrl = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("blobUrl")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + blobUrl = null; + continue; + } + blobUrl = new Uri(property.Value.GetString()); + continue; + } + } + return new BuildResultLog(blobUrl.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultLog.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultLog.cs new file mode 100644 index 0000000000000..7b369b17e0c9a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultLog.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Build result log resource properties payload. + public partial class BuildResultLog + { + /// Initializes a new instance of BuildResultLog. + internal BuildResultLog() + { + } + + /// Initializes a new instance of BuildResultLog. + /// The public download URL of this build result log. + internal BuildResultLog(Uri blobUri) + { + BlobUri = blobUri; + } + + /// The public download URL of this build result log. + public Uri BlobUri { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultProperties.Serialization.cs new file mode 100644 index 0000000000000..4b3ef141a8c8d --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultProperties.Serialization.cs @@ -0,0 +1,79 @@ +// 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 BuildResultProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(BuildPodName)) + { + writer.WritePropertyName("buildPodName"); + writer.WriteStringValue(BuildPodName); + } + writer.WriteEndObject(); + } + + internal static BuildResultProperties DeserializeBuildResultProperties(JsonElement element) + { + Optional name = default; + Optional provisioningState = default; + Optional buildPodName = default; + Optional> buildStages = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new BuildResultProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("buildPodName")) + { + buildPodName = property.Value.GetString(); + continue; + } + if (property.NameEquals("buildStages")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BuildStageProperties.DeserializeBuildStageProperties(item)); + } + buildStages = array; + continue; + } + } + return new BuildResultProperties(name.Value, Optional.ToNullable(provisioningState), buildPodName.Value, Optional.ToList(buildStages)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultProperties.cs new file mode 100644 index 0000000000000..9207c4dd768fa --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultProperties.cs @@ -0,0 +1,44 @@ +// 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 +{ + /// Build result resource properties payload. + public partial class BuildResultProperties + { + /// Initializes a new instance of BuildResultProperties. + public BuildResultProperties() + { + BuildStages = new ChangeTrackingList(); + } + + /// Initializes a new instance of BuildResultProperties. + /// The name of this build result. + /// Provisioning state of the KPack build result. + /// 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 BuildResultProperties(string name, BuildResultProvisioningState? provisioningState, string buildPodName, IReadOnlyList buildStages) + { + Name = name; + ProvisioningState = provisioningState; + BuildPodName = buildPodName; + BuildStages = buildStages; + } + + /// The name of this build result. + public string Name { get; set; } + /// Provisioning state of the KPack build result. + public BuildResultProvisioningState? ProvisioningState { get; } + /// 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; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultProvisioningState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultProvisioningState.cs new file mode 100644 index 0000000000000..457a779052bf7 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultProvisioningState.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 +{ + /// Provisioning state of the KPack build result. + public readonly partial struct BuildResultProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BuildResultProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string QueuingValue = "Queuing"; + private const string BuildingValue = "Building"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string DeletingValue = "Deleting"; + + /// Queuing. + public static BuildResultProvisioningState Queuing { get; } = new BuildResultProvisioningState(QueuingValue); + /// Building. + public static BuildResultProvisioningState Building { get; } = new BuildResultProvisioningState(BuildingValue); + /// Succeeded. + public static BuildResultProvisioningState Succeeded { get; } = new BuildResultProvisioningState(SucceededValue); + /// Failed. + public static BuildResultProvisioningState Failed { get; } = new BuildResultProvisioningState(FailedValue); + /// Deleting. + public static BuildResultProvisioningState Deleting { get; } = new BuildResultProvisioningState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(BuildResultProvisioningState left, BuildResultProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BuildResultProvisioningState left, BuildResultProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BuildResultProvisioningState(string value) => new BuildResultProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BuildResultProvisioningState other && Equals(other); + /// + public bool Equals(BuildResultProvisioningState 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/BuildResultUserSourceInfo.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultUserSourceInfo.Serialization.cs new file mode 100644 index 0000000000000..b2ebbb80b75c9 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultUserSourceInfo.Serialization.cs @@ -0,0 +1,59 @@ +// 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 BuildResultUserSourceInfo : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(BuildResultId)) + { + writer.WritePropertyName("buildResultId"); + writer.WriteStringValue(BuildResultId); + } + writer.WritePropertyName("type"); + writer.WriteStringValue(UserSourceInfoType); + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(Version); + } + writer.WriteEndObject(); + } + + internal static BuildResultUserSourceInfo DeserializeBuildResultUserSourceInfo(JsonElement element) + { + Optional buildResultId = default; + string type = default; + Optional version = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("buildResultId")) + { + buildResultId = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("version")) + { + version = property.Value.GetString(); + continue; + } + } + return new BuildResultUserSourceInfo(type, version.Value, buildResultId.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultUserSourceInfo.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultUserSourceInfo.cs new file mode 100644 index 0000000000000..c7be505f50662 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultUserSourceInfo.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Reference to a build result. + public partial class BuildResultUserSourceInfo : UserSourceInfo + { + /// Initializes a new instance of BuildResultUserSourceInfo. + public BuildResultUserSourceInfo() + { + UserSourceInfoType = "BuildResult"; + } + + /// Initializes a new instance of BuildResultUserSourceInfo. + /// Type of the source uploaded. + /// Version of the source. + /// Resource id of an existing succeeded build result under the same Spring instance. + internal BuildResultUserSourceInfo(string userSourceInfoType, string version, string buildResultId) : base(userSourceInfoType, version) + { + BuildResultId = buildResultId; + UserSourceInfoType = userSourceInfoType ?? "BuildResult"; + } + + /// Resource id of an existing succeeded build result under the same Spring instance. + public string BuildResultId { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolProperties.Serialization.cs new file mode 100644 index 0000000000000..4656a67276498 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolProperties.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class BuildServiceAgentPoolProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(PoolSize)) + { + writer.WritePropertyName("poolSize"); + writer.WriteObjectValue(PoolSize); + } + writer.WriteEndObject(); + } + + internal static BuildServiceAgentPoolProperties DeserializeBuildServiceAgentPoolProperties(JsonElement element) + { + Optional provisioningState = default; + Optional poolSize = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState")) + { + provisioningState = property.Value.GetString(); + continue; + } + if (property.NameEquals("poolSize")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + poolSize = BuildServiceAgentPoolSizeProperties.DeserializeBuildServiceAgentPoolSizeProperties(property.Value); + continue; + } + } + return new BuildServiceAgentPoolProperties(provisioningState.Value, poolSize.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolProperties.cs new file mode 100644 index 0000000000000..7aa43601c057d --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolProperties.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Build service agent pool properties. + public partial class BuildServiceAgentPoolProperties + { + /// Initializes a new instance of BuildServiceAgentPoolProperties. + public BuildServiceAgentPoolProperties() + { + } + + /// Initializes a new instance of BuildServiceAgentPoolProperties. + /// Provisioning state of the build service agent pool. + /// build service agent pool size properties. + internal BuildServiceAgentPoolProperties(string provisioningState, BuildServiceAgentPoolSizeProperties poolSize) + { + ProvisioningState = provisioningState; + PoolSize = poolSize; + } + + /// Provisioning state of the build service agent pool. + public string ProvisioningState { get; } + /// build service agent pool size properties. + public BuildServiceAgentPoolSizeProperties PoolSize { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceCollection.Serialization.cs new file mode 100644 index 0000000000000..162ed67e06df9 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceCollection.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class BuildServiceAgentPoolResourceCollection + { + internal static BuildServiceAgentPoolResourceCollection DeserializeBuildServiceAgentPoolResourceCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BuildServiceAgentPoolResourceData.DeserializeBuildServiceAgentPoolResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new BuildServiceAgentPoolResourceCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceCollection.cs new file mode 100644 index 0000000000000..9fc13f38b3280 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceCollection.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 build service agent pool resources and a possible link for next set. + internal partial class BuildServiceAgentPoolResourceCollection + { + /// Initializes a new instance of BuildServiceAgentPoolResourceCollection. + internal BuildServiceAgentPoolResourceCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of BuildServiceAgentPoolResourceCollection. + /// Collection of build service agent pool resource. + /// + /// URL client should use to fetch the next page (per server side paging). + /// It's null for now, added for future use. + /// + internal BuildServiceAgentPoolResourceCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of build service agent pool resource. + 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/BuildServiceAgentPoolResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceData.Serialization.cs new file mode 100644 index 0000000000000..0bf9975352e75 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceData.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; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + public partial class BuildServiceAgentPoolResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + + internal static BuildServiceAgentPoolResourceData DeserializeBuildServiceAgentPoolResourceData(JsonElement element) + { + Optional properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = BuildServiceAgentPoolProperties.DeserializeBuildServiceAgentPoolProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new BuildServiceAgentPoolResourceData(id, name, type, systemData, properties.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolSizeProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolSizeProperties.Serialization.cs new file mode 100644 index 0000000000000..7638a7471ce89 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolSizeProperties.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 BuildServiceAgentPoolSizeProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + writer.WriteEndObject(); + } + + internal static BuildServiceAgentPoolSizeProperties DeserializeBuildServiceAgentPoolSizeProperties(JsonElement element) + { + Optional name = default; + Optional cpu = default; + Optional memory = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("cpu")) + { + cpu = property.Value.GetString(); + continue; + } + if (property.NameEquals("memory")) + { + memory = property.Value.GetString(); + continue; + } + } + return new BuildServiceAgentPoolSizeProperties(name.Value, cpu.Value, memory.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolSizeProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolSizeProperties.cs new file mode 100644 index 0000000000000..1dcc74ca609f8 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolSizeProperties.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Build service agent pool size properties. + public partial class BuildServiceAgentPoolSizeProperties + { + /// Initializes a new instance of BuildServiceAgentPoolSizeProperties. + public BuildServiceAgentPoolSizeProperties() + { + } + + /// Initializes a new instance of BuildServiceAgentPoolSizeProperties. + /// The name of build service agent pool size. + /// The cpu property of build service agent pool size. + /// The memory property of build service agent pool size. + internal BuildServiceAgentPoolSizeProperties(string name, string cpu, string memory) + { + Name = name; + Cpu = cpu; + Memory = memory; + } + + /// The name of build service agent pool size. + public string Name { get; set; } + /// The cpu property of build service agent pool size. + public string Cpu { get; } + /// The memory property of build service agent pool size. + public string Memory { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceCollection.Serialization.cs new file mode 100644 index 0000000000000..6344daabdb581 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceCollection.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class BuildServiceCollection + { + internal static BuildServiceCollection DeserializeBuildServiceCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BuildServiceData.DeserializeBuildServiceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new BuildServiceCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceCollection.cs new file mode 100644 index 0000000000000..1527dca639379 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceCollection.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 Build service resources and a possible link for next set. + internal partial class BuildServiceCollection + { + /// Initializes a new instance of BuildServiceCollection. + internal BuildServiceCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of BuildServiceCollection. + /// Collection of Build service resources. + /// + /// URL client should use to fetch the next page (per server side paging). + /// It's null for now, added for future use. + /// + internal BuildServiceCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of Build service 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/BuildServiceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceData.Serialization.cs new file mode 100644 index 0000000000000..d2dcc50393d9a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceData.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; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + public partial class BuildServiceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + + internal static BuildServiceData DeserializeBuildServiceData(JsonElement element) + { + Optional properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = BuildServiceProperties.DeserializeBuildServiceProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new BuildServiceData(id, name, type, systemData, properties.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceProperties.Serialization.cs new file mode 100644 index 0000000000000..30c4475133088 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceProperties.Serialization.cs @@ -0,0 +1,67 @@ +// 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 BuildServiceProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(KPackVersion)) + { + writer.WritePropertyName("kPackVersion"); + writer.WriteStringValue(KPackVersion); + } + if (Optional.IsDefined(ResourceRequests)) + { + writer.WritePropertyName("resourceRequests"); + writer.WriteObjectValue(ResourceRequests); + } + writer.WriteEndObject(); + } + + internal static BuildServiceProperties DeserializeBuildServiceProperties(JsonElement element) + { + Optional kPackVersion = default; + Optional provisioningState = default; + Optional resourceRequests = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kPackVersion")) + { + kPackVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new BuildServiceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("resourceRequests")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + resourceRequests = BuildServicePropertiesResourceRequests.DeserializeBuildServicePropertiesResourceRequests(property.Value); + continue; + } + } + return new BuildServiceProperties(kPackVersion.Value, Optional.ToNullable(provisioningState), resourceRequests.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceProperties.cs new file mode 100644 index 0000000000000..c74fbe98eeb03 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceProperties.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Build service resource properties payload. + public partial class BuildServiceProperties + { + /// Initializes a new instance of BuildServiceProperties. + public BuildServiceProperties() + { + } + + /// Initializes a new instance of BuildServiceProperties. + /// The installed KPack version in this build service. + /// Provisioning state of the KPack build result. + /// The runtime resource configuration of this build service. + internal BuildServiceProperties(string kPackVersion, BuildServiceProvisioningState? provisioningState, BuildServicePropertiesResourceRequests resourceRequests) + { + KPackVersion = kPackVersion; + ProvisioningState = provisioningState; + ResourceRequests = resourceRequests; + } + + /// The installed KPack version in this build service. + public string KPackVersion { get; set; } + /// Provisioning state of the KPack build result. + public BuildServiceProvisioningState? ProvisioningState { get; } + /// The runtime resource configuration of this build service. + public BuildServicePropertiesResourceRequests ResourceRequests { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServicePropertiesResourceRequests.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServicePropertiesResourceRequests.Serialization.cs new file mode 100644 index 0000000000000..39f3c0a32c39e --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServicePropertiesResourceRequests.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 BuildServicePropertiesResourceRequests : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WriteEndObject(); + } + + internal static BuildServicePropertiesResourceRequests DeserializeBuildServicePropertiesResourceRequests(JsonElement element) + { + Optional cpu = default; + Optional memory = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("cpu")) + { + cpu = property.Value.GetString(); + continue; + } + if (property.NameEquals("memory")) + { + memory = property.Value.GetString(); + continue; + } + } + return new BuildServicePropertiesResourceRequests(cpu.Value, memory.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServicePropertiesResourceRequests.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServicePropertiesResourceRequests.cs new file mode 100644 index 0000000000000..fa6ba8728af2c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServicePropertiesResourceRequests.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 runtime resource configuration of this build service. + public partial class BuildServicePropertiesResourceRequests + { + /// Initializes a new instance of BuildServicePropertiesResourceRequests. + public BuildServicePropertiesResourceRequests() + { + } + + /// Initializes a new instance of BuildServicePropertiesResourceRequests. + /// vCPU allocated to the entire build service node pool. + /// Memory allocated to the entire build service node pool. + internal BuildServicePropertiesResourceRequests(string cpu, string memory) + { + Cpu = cpu; + Memory = memory; + } + + /// vCPU allocated to the entire build service node pool. + public string Cpu { get; } + /// Memory allocated to the entire build service node pool. + public string Memory { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceProvisioningState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceProvisioningState.cs new file mode 100644 index 0000000000000..1c2d1e1350e3e --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceProvisioningState.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 +{ + /// Provisioning state of the KPack build result. + public readonly partial struct BuildServiceProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BuildServiceProvisioningState(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 BuildServiceProvisioningState Creating { get; } = new BuildServiceProvisioningState(CreatingValue); + /// Updating. + public static BuildServiceProvisioningState Updating { get; } = new BuildServiceProvisioningState(UpdatingValue); + /// Succeeded. + public static BuildServiceProvisioningState Succeeded { get; } = new BuildServiceProvisioningState(SucceededValue); + /// Failed. + public static BuildServiceProvisioningState Failed { get; } = new BuildServiceProvisioningState(FailedValue); + /// Deleting. + public static BuildServiceProvisioningState Deleting { get; } = new BuildServiceProvisioningState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(BuildServiceProvisioningState left, BuildServiceProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BuildServiceProvisioningState left, BuildServiceProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BuildServiceProvisioningState(string value) => new BuildServiceProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BuildServiceProvisioningState other && Equals(other); + /// + public bool Equals(BuildServiceProvisioningState 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/BuildStageProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildStageProperties.Serialization.cs new file mode 100644 index 0000000000000..bf722559fc172 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildStageProperties.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class BuildStageProperties + { + internal static BuildStageProperties DeserializeBuildStageProperties(JsonElement element) + { + Optional name = default; + Optional status = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("status")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + status = new KPackBuildStageProvisioningState(property.Value.GetString()); + continue; + } + } + return new BuildStageProperties(name.Value, Optional.ToNullable(status)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildStageProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildStageProperties.cs new file mode 100644 index 0000000000000..e500208451b21 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildStageProperties.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 build stage (init-container and container) resources in build pod. + public partial class BuildStageProperties + { + /// Initializes a new instance of BuildStageProperties. + internal BuildStageProperties() + { + } + + /// Initializes a new instance of BuildStageProperties. + /// The name of this build stage resource. + /// The provisioning state of this build stage resource. + internal BuildStageProperties(string name, KPackBuildStageProvisioningState? status) + { + Name = name; + Status = status; + } + + /// The name of this build stage resource. + public string Name { get; } + /// The provisioning state of this build stage resource. + public KPackBuildStageProvisioningState? Status { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderProperties.Serialization.cs new file mode 100644 index 0000000000000..d78ab414330f3 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderProperties.Serialization.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class BuilderProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Stack)) + { + writer.WritePropertyName("stack"); + writer.WriteObjectValue(Stack); + } + if (Optional.IsCollectionDefined(BuildpackGroups)) + { + writer.WritePropertyName("buildpackGroups"); + writer.WriteStartArray(); + foreach (var item in BuildpackGroups) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static BuilderProperties DeserializeBuilderProperties(JsonElement element) + { + Optional provisioningState = default; + Optional stack = default; + Optional> buildpackGroups = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new BuilderProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("stack")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + stack = StackProperties.DeserializeStackProperties(property.Value); + continue; + } + if (property.NameEquals("buildpackGroups")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BuildpacksGroupProperties.DeserializeBuildpacksGroupProperties(item)); + } + buildpackGroups = array; + continue; + } + } + return new BuilderProperties(Optional.ToNullable(provisioningState), stack.Value, Optional.ToList(buildpackGroups)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderProperties.cs new file mode 100644 index 0000000000000..778fb1153a6f0 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderProperties.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 +{ + /// KPack Builder properties payload. + public partial class BuilderProperties + { + /// Initializes a new instance of BuilderProperties. + public BuilderProperties() + { + BuildpackGroups = new ChangeTrackingList(); + } + + /// Initializes a new instance of BuilderProperties. + /// Builder provision status. + /// Builder cluster stack property. + /// Builder buildpack groups. + internal BuilderProperties(BuilderProvisioningState? provisioningState, StackProperties stack, IList buildpackGroups) + { + ProvisioningState = provisioningState; + Stack = stack; + BuildpackGroups = buildpackGroups; + } + + /// Builder provision status. + public BuilderProvisioningState? ProvisioningState { get; } + /// Builder cluster stack property. + public StackProperties Stack { get; set; } + /// Builder buildpack groups. + public IList BuildpackGroups { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderProvisioningState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderProvisioningState.cs new file mode 100644 index 0000000000000..fe13493c64f61 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderProvisioningState.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 +{ + /// Builder provision status. + public readonly partial struct BuilderProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BuilderProvisioningState(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 BuilderProvisioningState Creating { get; } = new BuilderProvisioningState(CreatingValue); + /// Updating. + public static BuilderProvisioningState Updating { get; } = new BuilderProvisioningState(UpdatingValue); + /// Succeeded. + public static BuilderProvisioningState Succeeded { get; } = new BuilderProvisioningState(SucceededValue); + /// Failed. + public static BuilderProvisioningState Failed { get; } = new BuilderProvisioningState(FailedValue); + /// Deleting. + public static BuilderProvisioningState Deleting { get; } = new BuilderProvisioningState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(BuilderProvisioningState left, BuilderProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BuilderProvisioningState left, BuilderProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BuilderProvisioningState(string value) => new BuilderProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BuilderProvisioningState other && Equals(other); + /// + public bool Equals(BuilderProvisioningState 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/BuilderResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderResourceCollection.Serialization.cs new file mode 100644 index 0000000000000..f8487617adedb --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderResourceCollection.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class BuilderResourceCollection + { + internal static BuilderResourceCollection DeserializeBuilderResourceCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BuilderResourceData.DeserializeBuilderResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new BuilderResourceCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderResourceCollection.cs new file mode 100644 index 0000000000000..b9c0cb24b2ec8 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderResourceCollection.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 Builder resources and a possible link for next set. + internal partial class BuilderResourceCollection + { + /// Initializes a new instance of BuilderResourceCollection. + internal BuilderResourceCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of BuilderResourceCollection. + /// Collection of Builder resources. + /// + /// URL client should use to fetch the next page (per server side paging). + /// It's null for now, added for future use. + /// + internal BuilderResourceCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of Builder 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/BuilderResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderResourceData.Serialization.cs new file mode 100644 index 0000000000000..a99461e77d772 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderResourceData.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; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + public partial class BuilderResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + + internal static BuilderResourceData DeserializeBuilderResourceData(JsonElement element) + { + Optional properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = BuilderProperties.DeserializeBuilderProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new BuilderResourceData(id, name, type, systemData, properties.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingLaunchProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingLaunchProperties.Serialization.cs new file mode 100644 index 0000000000000..bbadb83267d32 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingLaunchProperties.Serialization.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class BuildpackBindingLaunchProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Secrets)) + { + writer.WritePropertyName("secrets"); + writer.WriteStartObject(); + foreach (var item in Secrets) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static BuildpackBindingLaunchProperties DeserializeBuildpackBindingLaunchProperties(JsonElement element) + { + Optional> properties = default; + Optional> secrets = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + 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")) + { + 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 BuildpackBindingLaunchProperties(Optional.ToDictionary(properties), Optional.ToDictionary(secrets)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingLaunchProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingLaunchProperties.cs new file mode 100644 index 0000000000000..a3653578badc2 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingLaunchProperties.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 +{ + /// Buildpack Binding Launch Properties. + public partial class BuildpackBindingLaunchProperties + { + /// Initializes a new instance of BuildpackBindingLaunchProperties. + public BuildpackBindingLaunchProperties() + { + Properties = new ChangeTrackingDictionary(); + Secrets = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of BuildpackBindingLaunchProperties. + /// Non-sensitive properties for launchProperties. + /// Sensitive properties for launchProperties. + internal BuildpackBindingLaunchProperties(IDictionary properties, IDictionary secrets) + { + Properties = properties; + Secrets = secrets; + } + + /// Non-sensitive properties for launchProperties. + public IDictionary Properties { get; } + /// Sensitive properties for launchProperties. + public IDictionary Secrets { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingProperties.Serialization.cs new file mode 100644 index 0000000000000..f1513a7c4ec0c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingProperties.Serialization.cs @@ -0,0 +1,72 @@ +// 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 BuildpackBindingProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(BindingType)) + { + writer.WritePropertyName("bindingType"); + writer.WriteStringValue(BindingType.Value.ToString()); + } + if (Optional.IsDefined(LaunchProperties)) + { + writer.WritePropertyName("launchProperties"); + writer.WriteObjectValue(LaunchProperties); + } + writer.WriteEndObject(); + } + + internal static BuildpackBindingProperties DeserializeBuildpackBindingProperties(JsonElement element) + { + Optional bindingType = default; + Optional provisioningState = default; + Optional launchProperties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("bindingType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + bindingType = new BindingType(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new BuildpackBindingProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("launchProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + launchProperties = BuildpackBindingLaunchProperties.DeserializeBuildpackBindingLaunchProperties(property.Value); + continue; + } + } + return new BuildpackBindingProperties(Optional.ToNullable(bindingType), Optional.ToNullable(provisioningState), launchProperties.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingProperties.cs new file mode 100644 index 0000000000000..a21539d48cc87 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingProperties.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Properties of a buildpack binding. + public partial class BuildpackBindingProperties + { + /// Initializes a new instance of BuildpackBindingProperties. + public BuildpackBindingProperties() + { + } + + /// Initializes a new instance of BuildpackBindingProperties. + /// Buildpack Binding Type. + /// State of the Buildpack Binding. + /// The object describes the buildpack binding launch properties. + internal BuildpackBindingProperties(BindingType? bindingType, BuildpackBindingProvisioningState? provisioningState, BuildpackBindingLaunchProperties launchProperties) + { + BindingType = bindingType; + ProvisioningState = provisioningState; + LaunchProperties = launchProperties; + } + + /// Buildpack Binding Type. + public BindingType? BindingType { get; set; } + /// State of the Buildpack Binding. + public BuildpackBindingProvisioningState? ProvisioningState { get; } + /// The object describes the buildpack binding launch properties. + public BuildpackBindingLaunchProperties LaunchProperties { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingProvisioningState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingProvisioningState.cs new file mode 100644 index 0000000000000..977d845dbe0ba --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingProvisioningState.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 Buildpack Binding. + public readonly partial struct BuildpackBindingProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BuildpackBindingProvisioningState(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 BuildpackBindingProvisioningState Creating { get; } = new BuildpackBindingProvisioningState(CreatingValue); + /// Updating. + public static BuildpackBindingProvisioningState Updating { get; } = new BuildpackBindingProvisioningState(UpdatingValue); + /// Succeeded. + public static BuildpackBindingProvisioningState Succeeded { get; } = new BuildpackBindingProvisioningState(SucceededValue); + /// Failed. + public static BuildpackBindingProvisioningState Failed { get; } = new BuildpackBindingProvisioningState(FailedValue); + /// Deleting. + public static BuildpackBindingProvisioningState Deleting { get; } = new BuildpackBindingProvisioningState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(BuildpackBindingProvisioningState left, BuildpackBindingProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BuildpackBindingProvisioningState left, BuildpackBindingProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BuildpackBindingProvisioningState(string value) => new BuildpackBindingProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BuildpackBindingProvisioningState other && Equals(other); + /// + public bool Equals(BuildpackBindingProvisioningState 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/BuildpackBindingResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingResourceCollection.Serialization.cs new file mode 100644 index 0000000000000..a79ad22bf8387 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingResourceCollection.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class BuildpackBindingResourceCollection + { + internal static BuildpackBindingResourceCollection DeserializeBuildpackBindingResourceCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BuildpackBindingResourceData.DeserializeBuildpackBindingResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new BuildpackBindingResourceCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingResourceCollection.cs new file mode 100644 index 0000000000000..3ff707e3305f6 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingResourceCollection.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 BuildpackBinding resources and a possible link for next set. + internal partial class BuildpackBindingResourceCollection + { + /// Initializes a new instance of BuildpackBindingResourceCollection. + internal BuildpackBindingResourceCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of BuildpackBindingResourceCollection. + /// Collection of BuildpackBinding resources. + /// + /// URL client should use to fetch the next page (per server side paging). + /// It's null for now, added for future use. + /// + internal BuildpackBindingResourceCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of BuildpackBinding 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/BuildpackBindingResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingResourceData.Serialization.cs new file mode 100644 index 0000000000000..e22857800af97 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingResourceData.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; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + public partial class BuildpackBindingResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + + internal static BuildpackBindingResourceData DeserializeBuildpackBindingResourceData(JsonElement element) + { + Optional properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = BuildpackBindingProperties.DeserializeBuildpackBindingProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new BuildpackBindingResourceData(id, name, type, systemData, properties.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpacksGroupProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpacksGroupProperties.Serialization.cs new file mode 100644 index 0000000000000..9396368eebe56 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpacksGroupProperties.Serialization.cs @@ -0,0 +1,68 @@ +// 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.Resources.Models; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class BuildpacksGroupProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Optional.IsCollectionDefined(Buildpacks)) + { + writer.WritePropertyName("buildpacks"); + writer.WriteStartArray(); + foreach (var item in Buildpacks) + { + JsonSerializer.Serialize(writer, item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static BuildpacksGroupProperties DeserializeBuildpacksGroupProperties(JsonElement element) + { + Optional name = default; + Optional> buildpacks = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("buildpacks")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(JsonSerializer.Deserialize(item.ToString())); + } + buildpacks = array; + continue; + } + } + return new BuildpacksGroupProperties(name.Value, Optional.ToList(buildpacks)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpacksGroupProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpacksGroupProperties.cs new file mode 100644 index 0000000000000..d3ca4f8c2e098 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpacksGroupProperties.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.Resources.Models; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Buildpack group properties of the Builder. + public partial class BuildpacksGroupProperties + { + /// Initializes a new instance of BuildpacksGroupProperties. + public BuildpacksGroupProperties() + { + Buildpacks = new ChangeTrackingList(); + } + + /// Initializes a new instance of BuildpacksGroupProperties. + /// Buildpack group name. + /// Buildpacks in the buildpack group. + internal BuildpacksGroupProperties(string name, IList buildpacks) + { + Name = name; + Buildpacks = buildpacks; + } + + /// Buildpack group name. + public string Name { get; set; } + /// Buildpacks in the buildpack group. + public IList Buildpacks { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateProperties.Serialization.cs new file mode 100644 index 0000000000000..b2a179d51952b --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateProperties.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 CertificateProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(CertificatePropertiesType); + writer.WriteEndObject(); + } + + internal static CertificateProperties DeserializeCertificateProperties(JsonElement element) + { + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "ContentCertificate": return ContentCertificateProperties.DeserializeContentCertificateProperties(element); + case "KeyVaultCertificate": return KeyVaultCertificateProperties.DeserializeKeyVaultCertificateProperties(element); + } + } + string type = default; + Optional thumbprint = default; + Optional issuer = default; + Optional issuedDate = default; + Optional expirationDate = default; + Optional activateDate = default; + Optional subjectName = default; + Optional> dnsNames = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("thumbprint")) + { + thumbprint = property.Value.GetString(); + continue; + } + if (property.NameEquals("issuer")) + { + issuer = property.Value.GetString(); + continue; + } + if (property.NameEquals("issuedDate")) + { + issuedDate = property.Value.GetString(); + continue; + } + if (property.NameEquals("expirationDate")) + { + expirationDate = property.Value.GetString(); + continue; + } + if (property.NameEquals("activateDate")) + { + activateDate = property.Value.GetString(); + continue; + } + if (property.NameEquals("subjectName")) + { + subjectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("dnsNames")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + dnsNames = array; + continue; + } + } + return new CertificateProperties(type, thumbprint.Value, issuer.Value, issuedDate.Value, expirationDate.Value, activateDate.Value, subjectName.Value, Optional.ToList(dnsNames)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateProperties.cs new file mode 100644 index 0000000000000..8affa5e4dc063 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateProperties.cs @@ -0,0 +1,60 @@ +// 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 +{ + /// Certificate resource payload. + public partial class CertificateProperties + { + /// Initializes a new instance of CertificateProperties. + public CertificateProperties() + { + DnsNames = new ChangeTrackingList(); + } + + /// Initializes a new instance of CertificateProperties. + /// The type of the certificate source. + /// The thumbprint of certificate. + /// The issuer of certificate. + /// The issue date of certificate. + /// The expiration date of certificate. + /// The activate date of certificate. + /// The subject name of certificate. + /// The domain list of certificate. + internal CertificateProperties(string certificatePropertiesType, string thumbprint, string issuer, string issuedDate, string expirationDate, string activateDate, string subjectName, IReadOnlyList dnsNames) + { + CertificatePropertiesType = certificatePropertiesType; + Thumbprint = thumbprint; + Issuer = issuer; + IssuedDate = issuedDate; + ExpirationDate = expirationDate; + ActivateDate = activateDate; + SubjectName = subjectName; + DnsNames = dnsNames; + } + + /// The type of the certificate source. + internal string CertificatePropertiesType { get; set; } + /// The thumbprint of certificate. + public string Thumbprint { get; } + /// The issuer of certificate. + public string Issuer { get; } + /// The issue date of certificate. + public string IssuedDate { get; } + /// The expiration date of certificate. + public string ExpirationDate { get; } + /// The activate date of certificate. + public string ActivateDate { get; } + /// The subject name of certificate. + public string SubjectName { get; } + /// The domain list of certificate. + public IReadOnlyList DnsNames { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateResourceCollection.Serialization.cs new file mode 100644 index 0000000000000..33bfed3c711ba --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateResourceCollection.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class CertificateResourceCollection + { + internal static CertificateResourceCollection DeserializeCertificateResourceCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CertificateResourceData.DeserializeCertificateResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new CertificateResourceCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateResourceCollection.cs new file mode 100644 index 0000000000000..77770856399f8 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateResourceCollection.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 certificate resources list and a possible link for next page. + internal partial class CertificateResourceCollection + { + /// Initializes a new instance of CertificateResourceCollection. + internal CertificateResourceCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of CertificateResourceCollection. + /// The certificate resources list. + /// The link to next page of certificate list. + internal CertificateResourceCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// The certificate resources list. + public IReadOnlyList Value { get; } + /// The link to next page of certificate list. + public string NextLink { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateResourceData.Serialization.cs new file mode 100644 index 0000000000000..dd0bc9abb7051 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateResourceData.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; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + public partial class CertificateResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + + internal static CertificateResourceData DeserializeCertificateResourceData(JsonElement element) + { + Optional properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = CertificateProperties.DeserializeCertificateProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new CertificateResourceData(id, name, type, systemData, properties.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ClusterResourceProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ClusterResourceProperties.Serialization.cs new file mode 100644 index 0000000000000..b45b54f16996d --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ClusterResourceProperties.Serialization.cs @@ -0,0 +1,106 @@ +// 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 ClusterResourceProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(NetworkProfile)) + { + writer.WritePropertyName("networkProfile"); + writer.WriteObjectValue(NetworkProfile); + } + if (Optional.IsDefined(ZoneRedundant)) + { + writer.WritePropertyName("zoneRedundant"); + writer.WriteBooleanValue(ZoneRedundant.Value); + } + writer.WriteEndObject(); + } + + internal static ClusterResourceProperties DeserializeClusterResourceProperties(JsonElement element) + { + Optional provisioningState = default; + Optional networkProfile = default; + Optional version = default; + Optional serviceId = default; + Optional powerState = default; + Optional zoneRedundant = default; + Optional fqdn = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("networkProfile")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + networkProfile = NetworkProfile.DeserializeNetworkProfile(property.Value); + continue; + } + if (property.NameEquals("version")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + version = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("serviceId")) + { + serviceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("powerState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + powerState = new PowerState(property.Value.GetString()); + continue; + } + if (property.NameEquals("zoneRedundant")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + zoneRedundant = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("fqdn")) + { + fqdn = property.Value.GetString(); + continue; + } + } + return new ClusterResourceProperties(Optional.ToNullable(provisioningState), networkProfile.Value, Optional.ToNullable(version), serviceId.Value, Optional.ToNullable(powerState), Optional.ToNullable(zoneRedundant), fqdn.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ClusterResourceProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ClusterResourceProperties.cs new file mode 100644 index 0000000000000..239ceca96e68a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ClusterResourceProperties.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Service properties payload. + public partial class ClusterResourceProperties + { + /// Initializes a new instance of ClusterResourceProperties. + public ClusterResourceProperties() + { + } + + /// Initializes a new instance of ClusterResourceProperties. + /// Provisioning state of the Service. + /// Network profile of the Service. + /// Version of the Service. + /// ServiceInstanceEntity GUID which uniquely identifies a created resource. + /// Power state of the Service. + /// + /// Fully qualified dns name of the service instance. + internal ClusterResourceProperties(ProvisioningState? provisioningState, NetworkProfile networkProfile, int? version, string serviceId, PowerState? powerState, bool? zoneRedundant, string fqdn) + { + ProvisioningState = provisioningState; + NetworkProfile = networkProfile; + Version = version; + ServiceId = serviceId; + PowerState = powerState; + ZoneRedundant = zoneRedundant; + Fqdn = fqdn; + } + + /// Provisioning state of the Service. + public ProvisioningState? ProvisioningState { get; } + /// Network profile of the Service. + public NetworkProfile NetworkProfile { get; set; } + /// Version of the Service. + public int? Version { get; } + /// ServiceInstanceEntity GUID which uniquely identifies a created resource. + public string ServiceId { get; } + /// Power state of the Service. + public PowerState? PowerState { get; } + /// Gets or sets the zone redundant. + public bool? ZoneRedundant { get; set; } + /// Fully qualified dns name of the service instance. + public string Fqdn { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerGitProperty.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerGitProperty.Serialization.cs new file mode 100644 index 0000000000000..c50aa8c539889 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerGitProperty.Serialization.cs @@ -0,0 +1,173 @@ +// 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 ConfigServerGitProperty : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Repositories)) + { + writer.WritePropertyName("repositories"); + writer.WriteStartArray(); + foreach (var item in Repositories) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("uri"); + writer.WriteStringValue(Uri.AbsoluteUri); + if (Optional.IsDefined(Label)) + { + writer.WritePropertyName("label"); + writer.WriteStringValue(Label); + } + if (Optional.IsCollectionDefined(SearchPaths)) + { + writer.WritePropertyName("searchPaths"); + writer.WriteStartArray(); + foreach (var item in SearchPaths) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Username)) + { + writer.WritePropertyName("username"); + writer.WriteStringValue(Username); + } + if (Optional.IsDefined(Password)) + { + writer.WritePropertyName("password"); + writer.WriteStringValue(Password); + } + if (Optional.IsDefined(HostKey)) + { + writer.WritePropertyName("hostKey"); + writer.WriteStringValue(HostKey); + } + if (Optional.IsDefined(HostKeyAlgorithm)) + { + writer.WritePropertyName("hostKeyAlgorithm"); + writer.WriteStringValue(HostKeyAlgorithm); + } + if (Optional.IsDefined(PrivateKey)) + { + writer.WritePropertyName("privateKey"); + writer.WriteStringValue(PrivateKey); + } + if (Optional.IsDefined(StrictHostKeyChecking)) + { + writer.WritePropertyName("strictHostKeyChecking"); + writer.WriteBooleanValue(StrictHostKeyChecking.Value); + } + writer.WriteEndObject(); + } + + internal static ConfigServerGitProperty DeserializeConfigServerGitProperty(JsonElement element) + { + Optional> repositories = default; + Uri uri = default; + Optional label = default; + Optional> searchPaths = default; + Optional username = default; + Optional password = default; + Optional hostKey = default; + Optional hostKeyAlgorithm = default; + Optional privateKey = default; + Optional strictHostKeyChecking = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("repositories")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(GitPatternRepository.DeserializeGitPatternRepository(item)); + } + repositories = array; + continue; + } + if (property.NameEquals("uri")) + { + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("label")) + { + label = property.Value.GetString(); + continue; + } + if (property.NameEquals("searchPaths")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + searchPaths = array; + continue; + } + if (property.NameEquals("username")) + { + username = property.Value.GetString(); + continue; + } + if (property.NameEquals("password")) + { + password = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostKey")) + { + hostKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostKeyAlgorithm")) + { + hostKeyAlgorithm = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateKey")) + { + privateKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("strictHostKeyChecking")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + strictHostKeyChecking = property.Value.GetBoolean(); + continue; + } + } + return new ConfigServerGitProperty(Optional.ToList(repositories), uri, label.Value, Optional.ToList(searchPaths), username.Value, password.Value, hostKey.Value, hostKeyAlgorithm.Value, privateKey.Value, Optional.ToNullable(strictHostKeyChecking)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerGitProperty.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerGitProperty.cs new file mode 100644 index 0000000000000..04d2e003374a4 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerGitProperty.cs @@ -0,0 +1,78 @@ +// 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 +{ + /// Property of git. + public partial class ConfigServerGitProperty + { + /// Initializes a new instance of ConfigServerGitProperty. + /// URI of the repository. + /// is null. + public ConfigServerGitProperty(Uri uri) + { + if (uri == null) + { + throw new ArgumentNullException(nameof(uri)); + } + + Repositories = new ChangeTrackingList(); + Uri = uri; + SearchPaths = new ChangeTrackingList(); + } + + /// Initializes a new instance of ConfigServerGitProperty. + /// Repositories of git. + /// URI of the repository. + /// Label of the repository. + /// Searching path of the repository. + /// Username of git repository basic auth. + /// Password of git repository basic auth. + /// Public sshKey of git repository. + /// SshKey algorithm of git repository. + /// Private sshKey algorithm of git repository. + /// Strict host key checking or not. + internal ConfigServerGitProperty(IList repositories, Uri uri, string label, IList searchPaths, string username, string password, string hostKey, string hostKeyAlgorithm, string privateKey, bool? strictHostKeyChecking) + { + Repositories = repositories; + Uri = uri; + Label = label; + SearchPaths = searchPaths; + Username = username; + Password = password; + HostKey = hostKey; + HostKeyAlgorithm = hostKeyAlgorithm; + PrivateKey = privateKey; + StrictHostKeyChecking = strictHostKeyChecking; + } + + /// Repositories of git. + public IList Repositories { get; } + /// URI of the repository. + public Uri Uri { get; set; } + /// Label of the repository. + public string Label { get; set; } + /// Searching path of the repository. + public IList SearchPaths { get; } + /// Username of git repository basic auth. + public string Username { get; set; } + /// Password of git repository basic auth. + public string Password { get; set; } + /// Public sshKey of git repository. + public string HostKey { get; set; } + /// SshKey algorithm of git repository. + public string HostKeyAlgorithm { get; set; } + /// Private sshKey algorithm of git repository. + public string PrivateKey { get; set; } + /// Strict host key checking or not. + public bool? StrictHostKeyChecking { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerProperties.Serialization.cs new file mode 100644 index 0000000000000..d42fff7609fad --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerProperties.Serialization.cs @@ -0,0 +1,72 @@ +// 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 ConfigServerProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"); + writer.WriteObjectValue(Error); + } + if (Optional.IsDefined(ConfigServer)) + { + writer.WritePropertyName("configServer"); + writer.WriteObjectValue(ConfigServer); + } + writer.WriteEndObject(); + } + + internal static ConfigServerProperties DeserializeConfigServerProperties(JsonElement element) + { + Optional provisioningState = default; + Optional error = default; + Optional configServer = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new ConfigServerState(property.Value.GetString()); + continue; + } + if (property.NameEquals("error")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + error = Error.DeserializeError(property.Value); + continue; + } + if (property.NameEquals("configServer")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + configServer = ConfigServerSettings.DeserializeConfigServerSettings(property.Value); + continue; + } + } + return new ConfigServerProperties(Optional.ToNullable(provisioningState), error.Value, configServer.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerProperties.cs new file mode 100644 index 0000000000000..9af8704a88fe0 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerProperties.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Config server git properties payload. + public partial class ConfigServerProperties + { + /// Initializes a new instance of ConfigServerProperties. + public ConfigServerProperties() + { + } + + /// Initializes a new instance of ConfigServerProperties. + /// State of the config server. + /// Error when apply config server settings. + /// Settings of config server. + internal ConfigServerProperties(ConfigServerState? provisioningState, Error error, ConfigServerSettings configServer) + { + ProvisioningState = provisioningState; + Error = error; + ConfigServer = configServer; + } + + /// State of the config server. + public ConfigServerState? ProvisioningState { get; } + /// Error when apply config server settings. + public Error Error { get; set; } + /// Settings of config server. + internal ConfigServerSettings ConfigServer { get; set; } + /// Property of git environment. + public ConfigServerGitProperty ConfigServerGitProperty + { + get => ConfigServer is null ? default : ConfigServer.GitProperty; + set + { + if (ConfigServer is null) + ConfigServer = new ConfigServerSettings(); + ConfigServer.GitProperty = value; + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerResourceData.Serialization.cs new file mode 100644 index 0000000000000..9c94ec2e173c1 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerResourceData.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; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + public partial class ConfigServerResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + + internal static ConfigServerResourceData DeserializeConfigServerResourceData(JsonElement element) + { + Optional properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = ConfigServerProperties.DeserializeConfigServerProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new ConfigServerResourceData(id, name, type, systemData, properties.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerSettings.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerSettings.Serialization.cs new file mode 100644 index 0000000000000..7e2aa3638552a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerSettings.Serialization.cs @@ -0,0 +1,45 @@ +// 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 ConfigServerSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(GitProperty)) + { + writer.WritePropertyName("gitProperty"); + writer.WriteObjectValue(GitProperty); + } + writer.WriteEndObject(); + } + + internal static ConfigServerSettings DeserializeConfigServerSettings(JsonElement element) + { + Optional gitProperty = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gitProperty")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + gitProperty = ConfigServerGitProperty.DeserializeConfigServerGitProperty(property.Value); + continue; + } + } + return new ConfigServerSettings(gitProperty.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerSettings.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerSettings.cs new file mode 100644 index 0000000000000..e46a4dded339a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerSettings.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// The settings of config server. + public partial class ConfigServerSettings + { + /// Initializes a new instance of ConfigServerSettings. + public ConfigServerSettings() + { + } + + /// Initializes a new instance of ConfigServerSettings. + /// Property of git environment. + internal ConfigServerSettings(ConfigServerGitProperty gitProperty) + { + GitProperty = gitProperty; + } + + /// Property of git environment. + public ConfigServerGitProperty GitProperty { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerSettingsErrorRecord.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerSettingsErrorRecord.Serialization.cs new file mode 100644 index 0000000000000..b26a2d91e107a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerSettingsErrorRecord.Serialization.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 System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class ConfigServerSettingsErrorRecord + { + internal static ConfigServerSettingsErrorRecord DeserializeConfigServerSettingsErrorRecord(JsonElement element) + { + Optional name = default; + Optional uri = default; + Optional> messages = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("uri")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + uri = null; + continue; + } + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("messages")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + messages = array; + continue; + } + } + return new ConfigServerSettingsErrorRecord(name.Value, uri.Value, Optional.ToList(messages)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerSettingsErrorRecord.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerSettingsErrorRecord.cs new file mode 100644 index 0000000000000..9d82a4a2704f8 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerSettingsErrorRecord.cs @@ -0,0 +1,41 @@ +// 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 +{ + /// Error record of the config server settings. + public partial class ConfigServerSettingsErrorRecord + { + /// Initializes a new instance of ConfigServerSettingsErrorRecord. + internal ConfigServerSettingsErrorRecord() + { + Messages = new ChangeTrackingList(); + } + + /// Initializes a new instance of ConfigServerSettingsErrorRecord. + /// The name of the config server settings error record. + /// The uri of the config server settings error record. + /// The detail error messages of the record. + internal ConfigServerSettingsErrorRecord(string name, Uri uri, IReadOnlyList messages) + { + Name = name; + Uri = uri; + Messages = messages; + } + + /// The name of the config server settings error record. + public string Name { get; } + /// The uri of the config server settings error record. + public Uri Uri { get; } + /// The detail error messages of the record. + public IReadOnlyList Messages { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerSettingsValidateResult.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerSettingsValidateResult.Serialization.cs new file mode 100644 index 0000000000000..9bed6a8a98136 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerSettingsValidateResult.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; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class ConfigServerSettingsValidateResult + { + internal static ConfigServerSettingsValidateResult DeserializeConfigServerSettingsValidateResult(JsonElement element) + { + Optional isValid = default; + Optional> details = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("isValid")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isValid = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("details")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ConfigServerSettingsErrorRecord.DeserializeConfigServerSettingsErrorRecord(item)); + } + details = array; + continue; + } + } + return new ConfigServerSettingsValidateResult(Optional.ToNullable(isValid), Optional.ToList(details)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerSettingsValidateResult.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerSettingsValidateResult.cs new file mode 100644 index 0000000000000..5eaddba9adcc2 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerSettingsValidateResult.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 +{ + /// Validation result for config server settings. + public partial class ConfigServerSettingsValidateResult + { + /// Initializes a new instance of ConfigServerSettingsValidateResult. + internal ConfigServerSettingsValidateResult() + { + Details = new ChangeTrackingList(); + } + + /// Initializes a new instance of ConfigServerSettingsValidateResult. + /// Indicate if the config server settings are valid. + /// The detail validation results. + internal ConfigServerSettingsValidateResult(bool? isValid, IReadOnlyList details) + { + IsValid = isValid; + Details = details; + } + + /// Indicate if the config server settings are valid. + public bool? IsValid { get; } + /// The detail validation results. + public IReadOnlyList Details { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerState.cs new file mode 100644 index 0000000000000..a89f288aaaec3 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerState.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 config server. + public readonly partial struct ConfigServerState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ConfigServerState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotAvailableValue = "NotAvailable"; + private const string DeletedValue = "Deleted"; + private const string FailedValue = "Failed"; + private const string SucceededValue = "Succeeded"; + private const string UpdatingValue = "Updating"; + + /// NotAvailable. + public static ConfigServerState NotAvailable { get; } = new ConfigServerState(NotAvailableValue); + /// Deleted. + public static ConfigServerState Deleted { get; } = new ConfigServerState(DeletedValue); + /// Failed. + public static ConfigServerState Failed { get; } = new ConfigServerState(FailedValue); + /// Succeeded. + public static ConfigServerState Succeeded { get; } = new ConfigServerState(SucceededValue); + /// Updating. + public static ConfigServerState Updating { get; } = new ConfigServerState(UpdatingValue); + /// Determines if two values are the same. + public static bool operator ==(ConfigServerState left, ConfigServerState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ConfigServerState left, ConfigServerState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ConfigServerState(string value) => new ConfigServerState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ConfigServerState other && Equals(other); + /// + public bool Equals(ConfigServerState 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/ConfigurationServiceGitProperty.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceGitProperty.Serialization.cs new file mode 100644 index 0000000000000..0dd10a8353ccd --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceGitProperty.Serialization.cs @@ -0,0 +1,56 @@ +// 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 +{ + internal partial class ConfigurationServiceGitProperty : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Repositories)) + { + writer.WritePropertyName("repositories"); + writer.WriteStartArray(); + foreach (var item in Repositories) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static ConfigurationServiceGitProperty DeserializeConfigurationServiceGitProperty(JsonElement element) + { + Optional> repositories = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("repositories")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ConfigurationServiceGitRepository.DeserializeConfigurationServiceGitRepository(item)); + } + repositories = array; + continue; + } + } + return new ConfigurationServiceGitProperty(Optional.ToList(repositories)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceGitProperty.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceGitProperty.cs new file mode 100644 index 0000000000000..afcd1b5b49466 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceGitProperty.cs @@ -0,0 +1,32 @@ +// 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 +{ + /// Property of git environment. + internal partial class ConfigurationServiceGitProperty + { + /// Initializes a new instance of ConfigurationServiceGitProperty. + public ConfigurationServiceGitProperty() + { + Repositories = new ChangeTrackingList(); + } + + /// Initializes a new instance of ConfigurationServiceGitProperty. + /// Repositories of Application Configuration Service git property. + internal ConfigurationServiceGitProperty(IList repositories) + { + Repositories = repositories; + } + + /// Repositories of Application Configuration Service git property. + public IList Repositories { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceGitPropertyValidateResult.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceGitPropertyValidateResult.Serialization.cs new file mode 100644 index 0000000000000..2eb0b81d68295 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceGitPropertyValidateResult.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; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class ConfigurationServiceGitPropertyValidateResult + { + internal static ConfigurationServiceGitPropertyValidateResult DeserializeConfigurationServiceGitPropertyValidateResult(JsonElement element) + { + Optional isValid = default; + Optional> gitReposValidationResult = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("isValid")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isValid = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("gitReposValidationResult")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ValidationMessages.DeserializeValidationMessages(item)); + } + gitReposValidationResult = array; + continue; + } + } + return new ConfigurationServiceGitPropertyValidateResult(Optional.ToNullable(isValid), Optional.ToList(gitReposValidationResult)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceGitPropertyValidateResult.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceGitPropertyValidateResult.cs new file mode 100644 index 0000000000000..6108c3bc9dbe2 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceGitPropertyValidateResult.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 +{ + /// Validation result for configuration service settings. + public partial class ConfigurationServiceGitPropertyValidateResult + { + /// Initializes a new instance of ConfigurationServiceGitPropertyValidateResult. + internal ConfigurationServiceGitPropertyValidateResult() + { + GitReposValidationResult = new ChangeTrackingList(); + } + + /// Initializes a new instance of ConfigurationServiceGitPropertyValidateResult. + /// Indicate if the configuration service settings are valid. + /// The detail validation results. + internal ConfigurationServiceGitPropertyValidateResult(bool? isValid, IReadOnlyList gitReposValidationResult) + { + IsValid = isValid; + GitReposValidationResult = gitReposValidationResult; + } + + /// Indicate if the configuration service settings are valid. + public bool? IsValid { get; } + /// The detail validation results. + public IReadOnlyList GitReposValidationResult { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceGitRepository.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceGitRepository.Serialization.cs new file mode 100644 index 0000000000000..f4710f57e4afd --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceGitRepository.Serialization.cs @@ -0,0 +1,170 @@ +// 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 ConfigurationServiceGitRepository : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WritePropertyName("patterns"); + writer.WriteStartArray(); + foreach (var item in Patterns) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("uri"); + writer.WriteStringValue(Uri.AbsoluteUri); + writer.WritePropertyName("label"); + writer.WriteStringValue(Label); + if (Optional.IsCollectionDefined(SearchPaths)) + { + writer.WritePropertyName("searchPaths"); + writer.WriteStartArray(); + foreach (var item in SearchPaths) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Username)) + { + writer.WritePropertyName("username"); + writer.WriteStringValue(Username); + } + if (Optional.IsDefined(Password)) + { + writer.WritePropertyName("password"); + writer.WriteStringValue(Password); + } + if (Optional.IsDefined(HostKey)) + { + writer.WritePropertyName("hostKey"); + writer.WriteStringValue(HostKey); + } + if (Optional.IsDefined(HostKeyAlgorithm)) + { + writer.WritePropertyName("hostKeyAlgorithm"); + writer.WriteStringValue(HostKeyAlgorithm); + } + if (Optional.IsDefined(PrivateKey)) + { + writer.WritePropertyName("privateKey"); + writer.WriteStringValue(PrivateKey); + } + if (Optional.IsDefined(StrictHostKeyChecking)) + { + writer.WritePropertyName("strictHostKeyChecking"); + writer.WriteBooleanValue(StrictHostKeyChecking.Value); + } + writer.WriteEndObject(); + } + + internal static ConfigurationServiceGitRepository DeserializeConfigurationServiceGitRepository(JsonElement element) + { + string name = default; + IList patterns = default; + Uri uri = default; + string label = default; + Optional> searchPaths = default; + Optional username = default; + Optional password = default; + Optional hostKey = default; + Optional hostKeyAlgorithm = default; + Optional privateKey = default; + Optional strictHostKeyChecking = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("patterns")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + patterns = array; + continue; + } + if (property.NameEquals("uri")) + { + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("label")) + { + label = property.Value.GetString(); + continue; + } + if (property.NameEquals("searchPaths")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + searchPaths = array; + continue; + } + if (property.NameEquals("username")) + { + username = property.Value.GetString(); + continue; + } + if (property.NameEquals("password")) + { + password = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostKey")) + { + hostKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostKeyAlgorithm")) + { + hostKeyAlgorithm = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateKey")) + { + privateKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("strictHostKeyChecking")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + strictHostKeyChecking = property.Value.GetBoolean(); + continue; + } + } + return new ConfigurationServiceGitRepository(name, patterns, uri, label, Optional.ToList(searchPaths), username.Value, password.Value, hostKey.Value, hostKeyAlgorithm.Value, privateKey.Value, Optional.ToNullable(strictHostKeyChecking)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceGitRepository.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceGitRepository.cs new file mode 100644 index 0000000000000..68bba867bec9b --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceGitRepository.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Git repository property payload for Application Configuration Service. + public partial class ConfigurationServiceGitRepository + { + /// Initializes a new instance of ConfigurationServiceGitRepository. + /// Name of the repository. + /// Collection of patterns of the repository. + /// URI of the repository. + /// Label of the repository. + /// , , or is null. + public ConfigurationServiceGitRepository(string name, IEnumerable patterns, Uri uri, string label) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (patterns == null) + { + throw new ArgumentNullException(nameof(patterns)); + } + if (uri == null) + { + throw new ArgumentNullException(nameof(uri)); + } + if (label == null) + { + throw new ArgumentNullException(nameof(label)); + } + + Name = name; + Patterns = patterns.ToList(); + Uri = uri; + Label = label; + SearchPaths = new ChangeTrackingList(); + } + + /// Initializes a new instance of ConfigurationServiceGitRepository. + /// Name of the repository. + /// Collection of patterns of the repository. + /// URI of the repository. + /// Label of the repository. + /// Searching path of the repository. + /// Username of git repository basic auth. + /// Password of git repository basic auth. + /// Public sshKey of git repository. + /// SshKey algorithm of git repository. + /// Private sshKey algorithm of git repository. + /// Strict host key checking or not. + internal ConfigurationServiceGitRepository(string name, IList patterns, Uri uri, string label, IList searchPaths, string username, string password, string hostKey, string hostKeyAlgorithm, string privateKey, bool? strictHostKeyChecking) + { + Name = name; + Patterns = patterns; + Uri = uri; + Label = label; + SearchPaths = searchPaths; + Username = username; + Password = password; + HostKey = hostKey; + HostKeyAlgorithm = hostKeyAlgorithm; + PrivateKey = privateKey; + StrictHostKeyChecking = strictHostKeyChecking; + } + + /// Name of the repository. + public string Name { get; set; } + /// Collection of patterns of the repository. + public IList Patterns { get; } + /// URI of the repository. + public Uri Uri { get; set; } + /// Label of the repository. + public string Label { get; set; } + /// Searching path of the repository. + public IList SearchPaths { get; } + /// Username of git repository basic auth. + public string Username { get; set; } + /// Password of git repository basic auth. + public string Password { get; set; } + /// Public sshKey of git repository. + public string HostKey { get; set; } + /// SshKey algorithm of git repository. + public string HostKeyAlgorithm { get; set; } + /// Private sshKey algorithm of git repository. + public string PrivateKey { get; set; } + /// Strict host key checking or not. + public bool? StrictHostKeyChecking { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceInstance.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceInstance.Serialization.cs new file mode 100644 index 0000000000000..f17b638055a53 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceInstance.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class ConfigurationServiceInstance + { + internal static ConfigurationServiceInstance DeserializeConfigurationServiceInstance(JsonElement element) + { + Optional name = default; + Optional status = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("status")) + { + status = property.Value.GetString(); + continue; + } + } + return new ConfigurationServiceInstance(name.Value, status.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceInstance.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceInstance.cs new file mode 100644 index 0000000000000..5fd927a316be3 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceInstance.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 Configuration Service. + public partial class ConfigurationServiceInstance + { + /// Initializes a new instance of ConfigurationServiceInstance. + internal ConfigurationServiceInstance() + { + } + + /// Initializes a new instance of ConfigurationServiceInstance. + /// Name of the Application Configuration Service instance. + /// Status of the Application Configuration Service instance. + internal ConfigurationServiceInstance(string name, string status) + { + Name = name; + Status = status; + } + + /// Name of the Application Configuration Service instance. + public string Name { get; } + /// Status of the Application Configuration Service instance. + public string Status { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceProperties.Serialization.cs new file mode 100644 index 0000000000000..dd2cc52abf780 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceProperties.Serialization.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class ConfigurationServiceProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Settings)) + { + writer.WritePropertyName("settings"); + writer.WriteObjectValue(Settings); + } + writer.WriteEndObject(); + } + + internal static ConfigurationServiceProperties DeserializeConfigurationServiceProperties(JsonElement element) + { + Optional provisioningState = default; + Optional resourceRequests = default; + Optional> instances = default; + Optional settings = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new ConfigurationServiceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("resourceRequests")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + resourceRequests = ConfigurationServiceResourceRequests.DeserializeConfigurationServiceResourceRequests(property.Value); + continue; + } + if (property.NameEquals("instances")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ConfigurationServiceInstance.DeserializeConfigurationServiceInstance(item)); + } + instances = array; + continue; + } + if (property.NameEquals("settings")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + settings = ConfigurationServiceSettings.DeserializeConfigurationServiceSettings(property.Value); + continue; + } + } + return new ConfigurationServiceProperties(Optional.ToNullable(provisioningState), resourceRequests.Value, Optional.ToList(instances), settings.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceProperties.cs new file mode 100644 index 0000000000000..d802475ba51a2 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceProperties.cs @@ -0,0 +1,54 @@ +// 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 Configuration Service properties payload. + public partial class ConfigurationServiceProperties + { + /// Initializes a new instance of ConfigurationServiceProperties. + public ConfigurationServiceProperties() + { + Instances = new ChangeTrackingList(); + } + + /// Initializes a new instance of ConfigurationServiceProperties. + /// State of the Application Configuration Service. + /// The requested resource quantity for required CPU and Memory. + /// Collection of instances belong to Application Configuration Service. + /// The settings of Application Configuration Service. + internal ConfigurationServiceProperties(ConfigurationServiceProvisioningState? provisioningState, ConfigurationServiceResourceRequests resourceRequests, IReadOnlyList instances, ConfigurationServiceSettings settings) + { + ProvisioningState = provisioningState; + ResourceRequests = resourceRequests; + Instances = instances; + Settings = settings; + } + + /// State of the Application Configuration Service. + public ConfigurationServiceProvisioningState? ProvisioningState { get; } + /// The requested resource quantity for required CPU and Memory. + public ConfigurationServiceResourceRequests ResourceRequests { get; } + /// Collection of instances belong to Application Configuration Service. + public IReadOnlyList Instances { get; } + /// The settings of Application Configuration Service. + internal ConfigurationServiceSettings Settings { get; set; } + /// Repositories of Application Configuration Service git property. + public IList GitPropertyRepositories + { + get + { + if (Settings is null) + Settings = new ConfigurationServiceSettings(); + return Settings.GitPropertyRepositories; + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceProvisioningState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceProvisioningState.cs new file mode 100644 index 0000000000000..8709fd2480a8d --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceProvisioningState.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 Configuration Service. + public readonly partial struct ConfigurationServiceProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ConfigurationServiceProvisioningState(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 ConfigurationServiceProvisioningState Creating { get; } = new ConfigurationServiceProvisioningState(CreatingValue); + /// Updating. + public static ConfigurationServiceProvisioningState Updating { get; } = new ConfigurationServiceProvisioningState(UpdatingValue); + /// Succeeded. + public static ConfigurationServiceProvisioningState Succeeded { get; } = new ConfigurationServiceProvisioningState(SucceededValue); + /// Failed. + public static ConfigurationServiceProvisioningState Failed { get; } = new ConfigurationServiceProvisioningState(FailedValue); + /// Deleting. + public static ConfigurationServiceProvisioningState Deleting { get; } = new ConfigurationServiceProvisioningState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(ConfigurationServiceProvisioningState left, ConfigurationServiceProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ConfigurationServiceProvisioningState left, ConfigurationServiceProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ConfigurationServiceProvisioningState(string value) => new ConfigurationServiceProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ConfigurationServiceProvisioningState other && Equals(other); + /// + public bool Equals(ConfigurationServiceProvisioningState 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/ConfigurationServiceResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceCollection.Serialization.cs new file mode 100644 index 0000000000000..dc7c950288351 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceCollection.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class ConfigurationServiceResourceCollection + { + internal static ConfigurationServiceResourceCollection DeserializeConfigurationServiceResourceCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ConfigurationServiceResourceData.DeserializeConfigurationServiceResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new ConfigurationServiceResourceCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceCollection.cs new file mode 100644 index 0000000000000..86c13bfffec0c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceCollection.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 configuration service resources and a possible link for next set. + internal partial class ConfigurationServiceResourceCollection + { + /// Initializes a new instance of ConfigurationServiceResourceCollection. + internal ConfigurationServiceResourceCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of ConfigurationServiceResourceCollection. + /// Collection of configuration service resources. + /// + /// URL client should use to fetch the next page (per server side paging). + /// It's null for now, added for future use. + /// + internal ConfigurationServiceResourceCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of configuration service 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/ConfigurationServiceResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceData.Serialization.cs new file mode 100644 index 0000000000000..386810f4e53af --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceData.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; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + public partial class ConfigurationServiceResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + + internal static ConfigurationServiceResourceData DeserializeConfigurationServiceResourceData(JsonElement element) + { + Optional properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = ConfigurationServiceProperties.DeserializeConfigurationServiceProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new ConfigurationServiceResourceData(id, name, type, systemData, properties.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceRequests.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceRequests.Serialization.cs new file mode 100644 index 0000000000000..36d6c2aba5f5c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceRequests.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class ConfigurationServiceResourceRequests + { + internal static ConfigurationServiceResourceRequests DeserializeConfigurationServiceResourceRequests(JsonElement element) + { + Optional cpu = default; + Optional memory = default; + Optional instanceCount = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("cpu")) + { + cpu = property.Value.GetString(); + continue; + } + if (property.NameEquals("memory")) + { + memory = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + instanceCount = property.Value.GetInt32(); + continue; + } + } + return new ConfigurationServiceResourceRequests(cpu.Value, memory.Value, Optional.ToNullable(instanceCount)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceRequests.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceRequests.cs new file mode 100644 index 0000000000000..34d6c28feb3b6 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceRequests.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Resource request payload of Application Configuration Service. + public partial class ConfigurationServiceResourceRequests + { + /// Initializes a new instance of ConfigurationServiceResourceRequests. + internal ConfigurationServiceResourceRequests() + { + } + + /// Initializes a new instance of ConfigurationServiceResourceRequests. + /// Cpu allocated to each Application Configuration Service instance. + /// Memory allocated to each Application Configuration Service instance. + /// Instance count of the Application Configuration Service. + internal ConfigurationServiceResourceRequests(string cpu, string memory, int? instanceCount) + { + Cpu = cpu; + Memory = memory; + InstanceCount = instanceCount; + } + + /// Cpu allocated to each Application Configuration Service instance. + public string Cpu { get; } + /// Memory allocated to each Application Configuration Service instance. + public string Memory { get; } + /// Instance count of the Application Configuration Service. + public int? InstanceCount { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceSettings.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceSettings.Serialization.cs new file mode 100644 index 0000000000000..07d614e0f72fd --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceSettings.Serialization.cs @@ -0,0 +1,45 @@ +// 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 ConfigurationServiceSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(GitProperty)) + { + writer.WritePropertyName("gitProperty"); + writer.WriteObjectValue(GitProperty); + } + writer.WriteEndObject(); + } + + internal static ConfigurationServiceSettings DeserializeConfigurationServiceSettings(JsonElement element) + { + Optional gitProperty = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gitProperty")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + gitProperty = ConfigurationServiceGitProperty.DeserializeConfigurationServiceGitProperty(property.Value); + continue; + } + } + return new ConfigurationServiceSettings(gitProperty.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceSettings.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceSettings.cs new file mode 100644 index 0000000000000..49581d0fb3e79 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceSettings.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// The settings of Application Configuration Service. + public partial class ConfigurationServiceSettings + { + /// Initializes a new instance of ConfigurationServiceSettings. + public ConfigurationServiceSettings() + { + } + + /// Initializes a new instance of ConfigurationServiceSettings. + /// Property of git environment. + internal ConfigurationServiceSettings(ConfigurationServiceGitProperty gitProperty) + { + GitProperty = gitProperty; + } + + /// Property of git environment. + internal ConfigurationServiceGitProperty GitProperty { get; set; } + /// Repositories of Application Configuration Service git property. + public IList GitPropertyRepositories + { + get + { + if (GitProperty is null) + GitProperty = new ConfigurationServiceGitProperty(); + return GitProperty.Repositories; + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceSettingsValidateResult.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceSettingsValidateResult.Serialization.cs new file mode 100644 index 0000000000000..871d940b81fa9 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceSettingsValidateResult.Serialization.cs @@ -0,0 +1,34 @@ +// 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 ConfigurationServiceSettingsValidateResult + { + internal static ConfigurationServiceSettingsValidateResult DeserializeConfigurationServiceSettingsValidateResult(JsonElement element) + { + Optional gitPropertyValidationResult = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gitPropertyValidationResult")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + gitPropertyValidationResult = ConfigurationServiceGitPropertyValidateResult.DeserializeConfigurationServiceGitPropertyValidateResult(property.Value); + continue; + } + } + return new ConfigurationServiceSettingsValidateResult(gitPropertyValidationResult.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceSettingsValidateResult.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceSettingsValidateResult.cs new file mode 100644 index 0000000000000..62024648d253a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceSettingsValidateResult.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Validation result for configuration service settings. + public partial class ConfigurationServiceSettingsValidateResult + { + /// Initializes a new instance of ConfigurationServiceSettingsValidateResult. + internal ConfigurationServiceSettingsValidateResult() + { + } + + /// Initializes a new instance of ConfigurationServiceSettingsValidateResult. + /// Validation result for configuration service settings. + internal ConfigurationServiceSettingsValidateResult(ConfigurationServiceGitPropertyValidateResult gitPropertyValidationResult) + { + GitPropertyValidationResult = gitPropertyValidationResult; + } + + /// Validation result for configuration service settings. + public ConfigurationServiceGitPropertyValidateResult GitPropertyValidationResult { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerProbeSettings.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerProbeSettings.Serialization.cs new file mode 100644 index 0000000000000..7e5e9fae70849 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerProbeSettings.Serialization.cs @@ -0,0 +1,45 @@ +// 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 ContainerProbeSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DisableProbe)) + { + writer.WritePropertyName("disableProbe"); + writer.WriteBooleanValue(DisableProbe.Value); + } + writer.WriteEndObject(); + } + + internal static ContainerProbeSettings DeserializeContainerProbeSettings(JsonElement element) + { + Optional disableProbe = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("disableProbe")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + disableProbe = property.Value.GetBoolean(); + continue; + } + } + return new ContainerProbeSettings(Optional.ToNullable(disableProbe)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerProbeSettings.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerProbeSettings.cs new file mode 100644 index 0000000000000..921b55993632f --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContainerProbeSettings.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Container liveness and readiness probe settings. + internal partial class ContainerProbeSettings + { + /// Initializes a new instance of ContainerProbeSettings. + public ContainerProbeSettings() + { + } + + /// Initializes a new instance of ContainerProbeSettings. + /// Indicates whether disable the liveness and readiness probe. + internal ContainerProbeSettings(bool? disableProbe) + { + DisableProbe = disableProbe; + } + + /// Indicates whether disable the liveness and readiness probe. + public bool? DisableProbe { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContentCertificateProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContentCertificateProperties.Serialization.cs new file mode 100644 index 0000000000000..28937888b971b --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContentCertificateProperties.Serialization.cs @@ -0,0 +1,101 @@ +// 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 ContentCertificateProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Content)) + { + writer.WritePropertyName("content"); + writer.WriteStringValue(Content); + } + writer.WritePropertyName("type"); + writer.WriteStringValue(CertificatePropertiesType); + writer.WriteEndObject(); + } + + internal static ContentCertificateProperties DeserializeContentCertificateProperties(JsonElement element) + { + Optional content = default; + string type = default; + Optional thumbprint = default; + Optional issuer = default; + Optional issuedDate = default; + Optional expirationDate = default; + Optional activateDate = default; + Optional subjectName = default; + Optional> dnsNames = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("content")) + { + content = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("thumbprint")) + { + thumbprint = property.Value.GetString(); + continue; + } + if (property.NameEquals("issuer")) + { + issuer = property.Value.GetString(); + continue; + } + if (property.NameEquals("issuedDate")) + { + issuedDate = property.Value.GetString(); + continue; + } + if (property.NameEquals("expirationDate")) + { + expirationDate = property.Value.GetString(); + continue; + } + if (property.NameEquals("activateDate")) + { + activateDate = property.Value.GetString(); + continue; + } + if (property.NameEquals("subjectName")) + { + subjectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("dnsNames")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + dnsNames = array; + continue; + } + } + return new ContentCertificateProperties(type, thumbprint.Value, issuer.Value, issuedDate.Value, expirationDate.Value, activateDate.Value, subjectName.Value, Optional.ToList(dnsNames), content.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContentCertificateProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContentCertificateProperties.cs new file mode 100644 index 0000000000000..d4dcff4a430d4 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ContentCertificateProperties.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Properties of certificate imported from key vault. + public partial class ContentCertificateProperties : CertificateProperties + { + /// Initializes a new instance of ContentCertificateProperties. + public ContentCertificateProperties() + { + CertificatePropertiesType = "ContentCertificate"; + } + + /// Initializes a new instance of ContentCertificateProperties. + /// The type of the certificate source. + /// The thumbprint of certificate. + /// The issuer of certificate. + /// The issue date of certificate. + /// The expiration date of certificate. + /// The activate date of certificate. + /// The subject name of certificate. + /// The domain list of certificate. + /// The content of uploaded certificate. + internal ContentCertificateProperties(string certificatePropertiesType, string thumbprint, string issuer, string issuedDate, string expirationDate, string activateDate, string subjectName, IReadOnlyList dnsNames, string content) : base(certificatePropertiesType, thumbprint, issuer, issuedDate, expirationDate, activateDate, subjectName, dnsNames) + { + Content = content; + CertificatePropertiesType = certificatePropertiesType ?? "ContentCertificate"; + } + + /// The content of uploaded certificate. + public string Content { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomContainer.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomContainer.Serialization.cs new file mode 100644 index 0000000000000..527a0aa6746c3 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomContainer.Serialization.cs @@ -0,0 +1,131 @@ +// 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 CustomContainer : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Server)) + { + writer.WritePropertyName("server"); + writer.WriteStringValue(Server); + } + if (Optional.IsDefined(ContainerImage)) + { + writer.WritePropertyName("containerImage"); + writer.WriteStringValue(ContainerImage); + } + if (Optional.IsCollectionDefined(Command)) + { + writer.WritePropertyName("command"); + writer.WriteStartArray(); + foreach (var item in Command) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Args)) + { + writer.WritePropertyName("args"); + writer.WriteStartArray(); + foreach (var item in Args) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ImageRegistryCredential)) + { + writer.WritePropertyName("imageRegistryCredential"); + writer.WriteObjectValue(ImageRegistryCredential); + } + if (Optional.IsDefined(LanguageFramework)) + { + writer.WritePropertyName("languageFramework"); + writer.WriteStringValue(LanguageFramework); + } + writer.WriteEndObject(); + } + + internal static CustomContainer DeserializeCustomContainer(JsonElement element) + { + Optional server = default; + Optional containerImage = default; + Optional> command = default; + Optional> args = default; + Optional imageRegistryCredential = default; + Optional languageFramework = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("server")) + { + server = property.Value.GetString(); + continue; + } + if (property.NameEquals("containerImage")) + { + containerImage = property.Value.GetString(); + continue; + } + if (property.NameEquals("command")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + command = array; + continue; + } + if (property.NameEquals("args")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + args = array; + continue; + } + if (property.NameEquals("imageRegistryCredential")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + imageRegistryCredential = ImageRegistryCredential.DeserializeImageRegistryCredential(property.Value); + continue; + } + if (property.NameEquals("languageFramework")) + { + languageFramework = property.Value.GetString(); + continue; + } + } + return new CustomContainer(server.Value, containerImage.Value, Optional.ToList(command), Optional.ToList(args), imageRegistryCredential.Value, languageFramework.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomContainer.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomContainer.cs new file mode 100644 index 0000000000000..b0d4b89c06e2f --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomContainer.cs @@ -0,0 +1,53 @@ +// 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 +{ + /// Custom container payload. + public partial class CustomContainer + { + /// Initializes a new instance of CustomContainer. + public CustomContainer() + { + Command = new ChangeTrackingList(); + Args = new ChangeTrackingList(); + } + + /// Initializes a new instance of CustomContainer. + /// The name of the registry that contains the container image. + /// Container image of the custom container. This should be in the form of <repository>:<tag> without the server name of the registry. + /// Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. + /// Arguments to the entrypoint. The docker image's CMD is used if this is not provided. + /// Credential of the image registry. + /// Language framework of the container image uploaded. + internal CustomContainer(string server, string containerImage, IList command, IList args, ImageRegistryCredential imageRegistryCredential, string languageFramework) + { + Server = server; + ContainerImage = containerImage; + Command = command; + Args = args; + ImageRegistryCredential = imageRegistryCredential; + LanguageFramework = languageFramework; + } + + /// The name of the registry that contains the container image. + public string Server { get; set; } + /// Container image of the custom container. This should be in the form of <repository>:<tag> without the server name of the registry. + public string ContainerImage { get; set; } + /// Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. + public IList Command { get; } + /// Arguments to the entrypoint. The docker image's CMD is used if this is not provided. + public IList Args { get; } + /// Credential of the image registry. + public ImageRegistryCredential ImageRegistryCredential { get; set; } + /// Language framework of the container image uploaded. + public string LanguageFramework { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomContainerUserSourceInfo.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomContainerUserSourceInfo.Serialization.cs new file mode 100644 index 0000000000000..5a9103df2c79c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomContainerUserSourceInfo.Serialization.cs @@ -0,0 +1,64 @@ +// 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 CustomContainerUserSourceInfo : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(CustomContainer)) + { + writer.WritePropertyName("customContainer"); + writer.WriteObjectValue(CustomContainer); + } + writer.WritePropertyName("type"); + writer.WriteStringValue(UserSourceInfoType); + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(Version); + } + writer.WriteEndObject(); + } + + internal static CustomContainerUserSourceInfo DeserializeCustomContainerUserSourceInfo(JsonElement element) + { + Optional customContainer = default; + string type = default; + Optional version = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customContainer")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + customContainer = CustomContainer.DeserializeCustomContainer(property.Value); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("version")) + { + version = property.Value.GetString(); + continue; + } + } + return new CustomContainerUserSourceInfo(type, version.Value, customContainer.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomContainerUserSourceInfo.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomContainerUserSourceInfo.cs new file mode 100644 index 0000000000000..214c9d5204d8f --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomContainerUserSourceInfo.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Custom container user source info. + public partial class CustomContainerUserSourceInfo : UserSourceInfo + { + /// Initializes a new instance of CustomContainerUserSourceInfo. + public CustomContainerUserSourceInfo() + { + UserSourceInfoType = "Container"; + } + + /// Initializes a new instance of CustomContainerUserSourceInfo. + /// Type of the source uploaded. + /// Version of the source. + /// Custom container payload. + internal CustomContainerUserSourceInfo(string userSourceInfoType, string version, CustomContainer customContainer) : base(userSourceInfoType, version) + { + CustomContainer = customContainer; + UserSourceInfoType = userSourceInfoType ?? "Container"; + } + + /// Custom container payload. + public CustomContainer CustomContainer { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainProperties.Serialization.cs new file mode 100644 index 0000000000000..13ad40ec5fb50 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainProperties.Serialization.cs @@ -0,0 +1,57 @@ +// 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 CustomDomainProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Thumbprint)) + { + writer.WritePropertyName("thumbprint"); + writer.WriteStringValue(Thumbprint); + } + if (Optional.IsDefined(CertName)) + { + writer.WritePropertyName("certName"); + writer.WriteStringValue(CertName); + } + writer.WriteEndObject(); + } + + internal static CustomDomainProperties DeserializeCustomDomainProperties(JsonElement element) + { + Optional thumbprint = default; + Optional appName = default; + Optional certName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("thumbprint")) + { + thumbprint = property.Value.GetString(); + continue; + } + if (property.NameEquals("appName")) + { + appName = property.Value.GetString(); + continue; + } + if (property.NameEquals("certName")) + { + certName = property.Value.GetString(); + continue; + } + } + return new CustomDomainProperties(thumbprint.Value, appName.Value, certName.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainProperties.cs new file mode 100644 index 0000000000000..333b2fd573b71 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainProperties.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Custom domain of app resource payload. + public partial class CustomDomainProperties + { + /// Initializes a new instance of CustomDomainProperties. + public CustomDomainProperties() + { + } + + /// Initializes a new instance of CustomDomainProperties. + /// The thumbprint of bound certificate. + /// The app name of domain. + /// The bound certificate name of domain. + internal CustomDomainProperties(string thumbprint, string appName, string certName) + { + Thumbprint = thumbprint; + AppName = appName; + CertName = certName; + } + + /// The thumbprint of bound certificate. + public string Thumbprint { get; set; } + /// The app name of domain. + public string AppName { get; } + /// The bound certificate name of domain. + public string CertName { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceCollection.Serialization.cs new file mode 100644 index 0000000000000..9ad379e6bb902 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceCollection.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class CustomDomainResourceCollection + { + internal static CustomDomainResourceCollection DeserializeCustomDomainResourceCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CustomDomainResourceData.DeserializeCustomDomainResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new CustomDomainResourceCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceCollection.cs new file mode 100644 index 0000000000000..39e803c64e494 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceCollection.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 a custom domain resources list and a possible link for next page. + internal partial class CustomDomainResourceCollection + { + /// Initializes a new instance of CustomDomainResourceCollection. + internal CustomDomainResourceCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of CustomDomainResourceCollection. + /// The custom domain resources list. + /// The link to next page of custom domain list. + internal CustomDomainResourceCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// The custom domain resources list. + public IReadOnlyList Value { get; } + /// The link to next page of custom domain list. + public string NextLink { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceData.Serialization.cs new file mode 100644 index 0000000000000..b9a80d3cad6bb --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceData.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; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + public partial class CustomDomainResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + + internal static CustomDomainResourceData DeserializeCustomDomainResourceData(JsonElement element) + { + Optional properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = CustomDomainProperties.DeserializeCustomDomainProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new CustomDomainResourceData(id, name, type, systemData, properties.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainValidatePayload.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainValidatePayload.Serialization.cs new file mode 100644 index 0000000000000..91bfa451a829e --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainValidatePayload.Serialization.cs @@ -0,0 +1,23 @@ +// 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 CustomDomainValidatePayload : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainValidatePayload.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainValidatePayload.cs new file mode 100644 index 0000000000000..cbd53179fc847 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainValidatePayload.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Custom domain validate payload. + public partial class CustomDomainValidatePayload + { + /// Initializes a new instance of CustomDomainValidatePayload. + /// Name to be validated. + /// is null. + public CustomDomainValidatePayload(string name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + + Name = name; + } + + /// Name to be validated. + public string Name { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainValidateResult.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainValidateResult.Serialization.cs new file mode 100644 index 0000000000000..f6a74990a4503 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainValidateResult.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class CustomDomainValidateResult + { + internal static CustomDomainValidateResult DeserializeCustomDomainValidateResult(JsonElement element) + { + Optional isValid = default; + Optional message = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("isValid")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isValid = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("message")) + { + message = property.Value.GetString(); + continue; + } + } + return new CustomDomainValidateResult(Optional.ToNullable(isValid), message.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainValidateResult.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainValidateResult.cs new file mode 100644 index 0000000000000..9501951d1b9b0 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainValidateResult.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 custom domain. + public partial class CustomDomainValidateResult + { + /// Initializes a new instance of CustomDomainValidateResult. + internal CustomDomainValidateResult() + { + } + + /// Initializes a new instance of CustomDomainValidateResult. + /// Indicates if domain name is valid. + /// Message of why domain name is invalid. + internal CustomDomainValidateResult(bool? isValid, string message) + { + IsValid = isValid; + Message = message; + } + + /// Indicates if domain name is valid. + public bool? IsValid { get; } + /// Message of why domain name is invalid. + public string Message { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskProperties.Serialization.cs new file mode 100644 index 0000000000000..73c81ea067df7 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskProperties.Serialization.cs @@ -0,0 +1,95 @@ +// 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 CustomPersistentDiskProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(UnderlyingResourceType.ToString()); + writer.WritePropertyName("mountPath"); + writer.WriteStringValue(MountPath); + if (Optional.IsDefined(ReadOnly)) + { + writer.WritePropertyName("readOnly"); + writer.WriteBooleanValue(ReadOnly.Value); + } + if (Optional.IsCollectionDefined(MountOptions)) + { + writer.WritePropertyName("mountOptions"); + writer.WriteStartArray(); + foreach (var item in MountOptions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static CustomPersistentDiskProperties DeserializeCustomPersistentDiskProperties(JsonElement element) + { + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AzureFileVolume": return AzureFileVolume.DeserializeAzureFileVolume(element); + } + } + UnderlyingResourceType type = default; + string mountPath = default; + Optional readOnly = default; + Optional> mountOptions = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = new UnderlyingResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("mountPath")) + { + mountPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("readOnly")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + readOnly = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("mountOptions")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + mountOptions = array; + continue; + } + } + return new CustomPersistentDiskProperties(type, mountPath, Optional.ToNullable(readOnly), Optional.ToList(mountOptions)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskProperties.cs new file mode 100644 index 0000000000000..3470c70f797ef --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskProperties.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 +{ + /// Custom persistent disk resource payload. + public partial class CustomPersistentDiskProperties + { + /// Initializes a new instance of CustomPersistentDiskProperties. + /// The mount path of the persistent disk. + /// is null. + public CustomPersistentDiskProperties(string mountPath) + { + if (mountPath == null) + { + throw new ArgumentNullException(nameof(mountPath)); + } + + MountPath = mountPath; + MountOptions = new ChangeTrackingList(); + } + + /// Initializes a new instance of CustomPersistentDiskProperties. + /// 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. + /// These are the mount options for a persistent disk. + internal CustomPersistentDiskProperties(UnderlyingResourceType underlyingResourceType, string mountPath, bool? readOnly, IList mountOptions) + { + UnderlyingResourceType = underlyingResourceType; + MountPath = mountPath; + ReadOnly = readOnly; + MountOptions = mountOptions; + } + + /// The type of the underlying resource to mount as a persistent disk. + internal UnderlyingResourceType UnderlyingResourceType { get; set; } + /// The mount path of the persistent disk. + public string MountPath { get; set; } + /// Indicates whether the persistent disk is a readOnly one. + public bool? ReadOnly { 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/CustomPersistentDiskResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskResource.Serialization.cs new file mode 100644 index 0000000000000..df17597312176 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskResource.Serialization.cs @@ -0,0 +1,53 @@ +// 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 CustomPersistentDiskResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(CustomPersistentDiskProperties)) + { + writer.WritePropertyName("customPersistentDiskProperties"); + writer.WriteObjectValue(CustomPersistentDiskProperties); + } + writer.WritePropertyName("storageId"); + writer.WriteStringValue(StorageId); + writer.WriteEndObject(); + } + + internal static CustomPersistentDiskResource DeserializeCustomPersistentDiskResource(JsonElement element) + { + Optional customPersistentDiskProperties = default; + string storageId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customPersistentDiskProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + customPersistentDiskProperties = CustomPersistentDiskProperties.DeserializeCustomPersistentDiskProperties(property.Value); + continue; + } + if (property.NameEquals("storageId")) + { + storageId = property.Value.GetString(); + continue; + } + } + return new CustomPersistentDiskResource(customPersistentDiskProperties.Value, storageId); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskResource.cs new file mode 100644 index 0000000000000..1dfb1490d4a91 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskResource.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Custom persistent disk resource payload. + public partial class CustomPersistentDiskResource + { + /// Initializes a new instance of CustomPersistentDiskResource. + /// The resource id of Azure Spring Cloud Storage resource. + /// is null. + public CustomPersistentDiskResource(string storageId) + { + if (storageId == null) + { + throw new ArgumentNullException(nameof(storageId)); + } + + StorageId = storageId; + } + + /// Initializes a new instance of CustomPersistentDiskResource. + /// Properties of the custom persistent disk resource payload. + /// The resource id of Azure Spring Cloud Storage resource. + internal CustomPersistentDiskResource(CustomPersistentDiskProperties customPersistentDiskProperties, string storageId) + { + CustomPersistentDiskProperties = customPersistentDiskProperties; + StorageId = storageId; + } + + /// Properties of the custom persistent disk resource payload. + public CustomPersistentDiskProperties CustomPersistentDiskProperties { get; set; } + /// The resource id of Azure Spring Cloud Storage resource. + public string StorageId { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentInstance.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentInstance.Serialization.cs new file mode 100644 index 0000000000000..985b60ad9502f --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentInstance.Serialization.cs @@ -0,0 +1,59 @@ +// 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 DeploymentInstance + { + internal static DeploymentInstance DeserializeDeploymentInstance(JsonElement element) + { + Optional name = default; + Optional status = default; + Optional reason = default; + Optional discoveryStatus = default; + Optional startTime = default; + Optional zone = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("status")) + { + status = property.Value.GetString(); + continue; + } + if (property.NameEquals("reason")) + { + reason = property.Value.GetString(); + continue; + } + if (property.NameEquals("discoveryStatus")) + { + discoveryStatus = property.Value.GetString(); + continue; + } + if (property.NameEquals("startTime")) + { + startTime = property.Value.GetString(); + continue; + } + if (property.NameEquals("zone")) + { + zone = property.Value.GetString(); + continue; + } + } + return new DeploymentInstance(name.Value, status.Value, reason.Value, discoveryStatus.Value, startTime.Value, zone.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentInstance.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentInstance.cs new file mode 100644 index 0000000000000..408cb2b08fbb2 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentInstance.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Deployment instance payload. + public partial class DeploymentInstance + { + /// Initializes a new instance of DeploymentInstance. + internal DeploymentInstance() + { + } + + /// Initializes a new instance of DeploymentInstance. + /// Name of the deployment instance. + /// Status of the deployment instance. + /// Failed reason of the deployment instance. + /// Discovery status of the deployment instance. + /// Start time of the deployment instance. + /// Availability zone information of the deployment instance. + internal DeploymentInstance(string name, string status, string reason, string discoveryStatus, string startTime, string zone) + { + Name = name; + Status = status; + Reason = reason; + DiscoveryStatus = discoveryStatus; + StartTime = startTime; + Zone = zone; + } + + /// Name of the deployment instance. + public string Name { get; } + /// Status of the deployment instance. + public string Status { get; } + /// Failed reason of the deployment instance. + public string Reason { get; } + /// Discovery status of the deployment instance. + public string DiscoveryStatus { get; } + /// Start time of the deployment instance. + public string StartTime { get; } + /// Availability zone information of the deployment instance. + public string Zone { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceCollection.Serialization.cs new file mode 100644 index 0000000000000..e99ec3973a35d --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceCollection.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class DeploymentResourceCollection + { + internal static DeploymentResourceCollection DeserializeDeploymentResourceCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeploymentResourceData.DeserializeDeploymentResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new DeploymentResourceCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceCollection.cs new file mode 100644 index 0000000000000..f16aa7597c4b3 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceCollection.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 App resources and a possible link for next set. + internal partial class DeploymentResourceCollection + { + /// Initializes a new instance of DeploymentResourceCollection. + internal DeploymentResourceCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of DeploymentResourceCollection. + /// Collection of Deployment resources. + /// + /// URL client should use to fetch the next page (per server side paging). + /// It's null for now, added for future use. + /// + internal DeploymentResourceCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of Deployment 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/DeploymentResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceData.Serialization.cs new file mode 100644 index 0000000000000..0fb145c7b6495 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceData.Serialization.cs @@ -0,0 +1,87 @@ +// 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 DeploymentResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"); + writer.WriteObjectValue(Sku); + } + writer.WriteEndObject(); + } + + internal static DeploymentResourceData DeserializeDeploymentResourceData(JsonElement element) + { + Optional properties = default; + Optional sku = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = DeploymentResourceProperties.DeserializeDeploymentResourceProperties(property.Value); + continue; + } + if (property.NameEquals("sku")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sku = AppPlatformSku.DeserializeAppPlatformSku(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new DeploymentResourceData(id, name, type, systemData, properties.Value, sku.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceProperties.Serialization.cs new file mode 100644 index 0000000000000..07280f1032743 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceProperties.Serialization.cs @@ -0,0 +1,116 @@ +// 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 DeploymentResourceProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Source)) + { + writer.WritePropertyName("source"); + writer.WriteObjectValue(Source); + } + if (Optional.IsDefined(DeploymentSettings)) + { + writer.WritePropertyName("deploymentSettings"); + writer.WriteObjectValue(DeploymentSettings); + } + if (Optional.IsDefined(Active)) + { + writer.WritePropertyName("active"); + writer.WriteBooleanValue(Active.Value); + } + writer.WriteEndObject(); + } + + internal static DeploymentResourceProperties DeserializeDeploymentResourceProperties(JsonElement element) + { + Optional source = default; + Optional deploymentSettings = default; + Optional provisioningState = default; + Optional status = default; + Optional active = default; + Optional> instances = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("source")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + source = UserSourceInfo.DeserializeUserSourceInfo(property.Value); + continue; + } + if (property.NameEquals("deploymentSettings")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + deploymentSettings = DeploymentSettings.DeserializeDeploymentSettings(property.Value); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new DeploymentResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("status")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + status = new DeploymentResourceStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("active")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + active = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("instances")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeploymentInstance.DeserializeDeploymentInstance(item)); + } + instances = array; + continue; + } + } + return new DeploymentResourceProperties(source.Value, deploymentSettings.Value, Optional.ToNullable(provisioningState), Optional.ToNullable(status), Optional.ToNullable(active), Optional.ToList(instances)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceProperties.cs new file mode 100644 index 0000000000000..36c68facd8e60 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceProperties.cs @@ -0,0 +1,52 @@ +// 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 +{ + /// Deployment resource properties payload. + public partial class DeploymentResourceProperties + { + /// Initializes a new instance of DeploymentResourceProperties. + public DeploymentResourceProperties() + { + Instances = new ChangeTrackingList(); + } + + /// Initializes a new instance of DeploymentResourceProperties. + /// Uploaded source information of the deployment. + /// Deployment settings of the Deployment. + /// Provisioning state of the Deployment. + /// Status of the Deployment. + /// Indicates whether the Deployment is active. + /// Collection of instances belong to the Deployment. + internal DeploymentResourceProperties(UserSourceInfo source, DeploymentSettings deploymentSettings, DeploymentResourceProvisioningState? provisioningState, DeploymentResourceStatus? status, bool? active, IReadOnlyList instances) + { + Source = source; + DeploymentSettings = deploymentSettings; + ProvisioningState = provisioningState; + Status = status; + Active = active; + Instances = instances; + } + + /// Uploaded source information of the deployment. + public UserSourceInfo Source { get; set; } + /// Deployment settings of the Deployment. + public DeploymentSettings DeploymentSettings { get; set; } + /// Provisioning state of the Deployment. + public DeploymentResourceProvisioningState? ProvisioningState { get; } + /// Status of the Deployment. + public DeploymentResourceStatus? Status { get; } + /// Indicates whether the Deployment is active. + public bool? Active { get; set; } + /// Collection of instances belong to the Deployment. + public IReadOnlyList Instances { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceProvisioningState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceProvisioningState.cs new file mode 100644 index 0000000000000..184b650b46b02 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceProvisioningState.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 Deployment. + public readonly partial struct DeploymentResourceProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DeploymentResourceProvisioningState(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 DeploymentResourceProvisioningState Creating { get; } = new DeploymentResourceProvisioningState(CreatingValue); + /// Updating. + public static DeploymentResourceProvisioningState Updating { get; } = new DeploymentResourceProvisioningState(UpdatingValue); + /// Succeeded. + public static DeploymentResourceProvisioningState Succeeded { get; } = new DeploymentResourceProvisioningState(SucceededValue); + /// Failed. + public static DeploymentResourceProvisioningState Failed { get; } = new DeploymentResourceProvisioningState(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(DeploymentResourceProvisioningState left, DeploymentResourceProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DeploymentResourceProvisioningState left, DeploymentResourceProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DeploymentResourceProvisioningState(string value) => new DeploymentResourceProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DeploymentResourceProvisioningState other && Equals(other); + /// + public bool Equals(DeploymentResourceProvisioningState 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/DeploymentResourceStatus.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceStatus.cs new file mode 100644 index 0000000000000..31c017cff0d6d --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceStatus.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 +{ + /// Status of the Deployment. + public readonly partial struct DeploymentResourceStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DeploymentResourceStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StoppedValue = "Stopped"; + private const string RunningValue = "Running"; + + /// Stopped. + public static DeploymentResourceStatus Stopped { get; } = new DeploymentResourceStatus(StoppedValue); + /// Running. + public static DeploymentResourceStatus Running { get; } = new DeploymentResourceStatus(RunningValue); + /// Determines if two values are the same. + public static bool operator ==(DeploymentResourceStatus left, DeploymentResourceStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DeploymentResourceStatus left, DeploymentResourceStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DeploymentResourceStatus(string value) => new DeploymentResourceStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DeploymentResourceStatus other && Equals(other); + /// + public bool Equals(DeploymentResourceStatus 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/DeploymentSettings.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentSettings.Serialization.cs new file mode 100644 index 0000000000000..a9f3d9f9c53c3 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentSettings.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 DeploymentSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ResourceRequests)) + { + writer.WritePropertyName("resourceRequests"); + writer.WriteObjectValue(ResourceRequests); + } + if (Optional.IsCollectionDefined(EnvironmentVariables)) + { + writer.WritePropertyName("environmentVariables"); + writer.WriteStartObject(); + foreach (var item in EnvironmentVariables) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(AddonConfigs)) + { + writer.WritePropertyName("addonConfigs"); + writer.WriteStartObject(); + foreach (var item in AddonConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteStartObject(); + foreach (var item0 in item.Value) + { + writer.WritePropertyName(item0.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item0.Value); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(item0.Value.ToString()).RootElement); +#endif + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(ContainerProbeSettings)) + { + writer.WritePropertyName("containerProbeSettings"); + writer.WriteObjectValue(ContainerProbeSettings); + } + writer.WriteEndObject(); + } + + internal static DeploymentSettings DeserializeDeploymentSettings(JsonElement element) + { + Optional resourceRequests = default; + Optional> environmentVariables = default; + Optional>> addonConfigs = default; + Optional containerProbeSettings = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceRequests")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + resourceRequests = ResourceRequests.DeserializeResourceRequests(property.Value); + continue; + } + if (property.NameEquals("environmentVariables")) + { + 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()); + } + environmentVariables = dictionary; + continue; + } + if (property.NameEquals("addonConfigs")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary> dictionary = new Dictionary>(); + foreach (var property0 in property.Value.EnumerateObject()) + { + Dictionary dictionary0 = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary0.Add(property1.Name, BinaryData.FromString(property1.Value.GetRawText())); + } + dictionary.Add(property0.Name, dictionary0); + } + addonConfigs = dictionary; + continue; + } + if (property.NameEquals("containerProbeSettings")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + containerProbeSettings = ContainerProbeSettings.DeserializeContainerProbeSettings(property.Value); + continue; + } + } + return new DeploymentSettings(resourceRequests.Value, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(addonConfigs), containerProbeSettings.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentSettings.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentSettings.cs new file mode 100644 index 0000000000000..4f6d44aaf20ba --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentSettings.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 +{ + /// Deployment settings payload. + public partial class DeploymentSettings + { + /// Initializes a new instance of DeploymentSettings. + public DeploymentSettings() + { + EnvironmentVariables = new ChangeTrackingDictionary(); + AddonConfigs = new ChangeTrackingDictionary>(); + } + + /// Initializes a new instance of DeploymentSettings. + /// The requested resource quantity for required CPU and Memory. It is recommended that using this field to represent the required CPU and Memory, the old field cpu and memoryInGB will be deprecated later. + /// Collection of environment variables. + /// Collection of addons. + /// Container liveness and readiness probe settings. + internal DeploymentSettings(ResourceRequests resourceRequests, IDictionary environmentVariables, IDictionary> addonConfigs, ContainerProbeSettings containerProbeSettings) + { + ResourceRequests = resourceRequests; + EnvironmentVariables = environmentVariables; + AddonConfigs = addonConfigs; + ContainerProbeSettings = containerProbeSettings; + } + + /// The requested resource quantity for required CPU and Memory. It is recommended that using this field to represent the required CPU and Memory, the old field cpu and memoryInGB will be deprecated later. + public ResourceRequests ResourceRequests { get; set; } + /// Collection of environment variables. + public IDictionary EnvironmentVariables { get; } + /// Collection of addons. + public IDictionary> AddonConfigs { get; } + /// Container liveness and readiness probe settings. + internal ContainerProbeSettings ContainerProbeSettings { get; set; } + /// Indicates whether disable the liveness and readiness probe. + public bool? DisableProbe + { + get => ContainerProbeSettings is null ? default : ContainerProbeSettings.DisableProbe; + set + { + if (ContainerProbeSettings is null) + ContainerProbeSettings = new ContainerProbeSettings(); + ContainerProbeSettings.DisableProbe = value; + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DiagnosticParameters.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DiagnosticParameters.Serialization.cs new file mode 100644 index 0000000000000..0b88cdfdd92e6 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DiagnosticParameters.Serialization.cs @@ -0,0 +1,36 @@ +// 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 DiagnosticParameters : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AppInstance)) + { + writer.WritePropertyName("appInstance"); + writer.WriteStringValue(AppInstance); + } + if (Optional.IsDefined(FilePath)) + { + writer.WritePropertyName("filePath"); + writer.WriteStringValue(FilePath); + } + if (Optional.IsDefined(DurationValue)) + { + writer.WritePropertyName("duration"); + writer.WriteStringValue(DurationValue); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DiagnosticParameters.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DiagnosticParameters.cs new file mode 100644 index 0000000000000..452281322d52a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DiagnosticParameters.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Diagnostic parameters of diagnostic operations. + public partial class DiagnosticParameters + { + /// Initializes a new instance of DiagnosticParameters. + public DiagnosticParameters() + { + } + + /// App instance name. + public string AppInstance { get; set; } + /// Your target file path in your own BYOS. + public string FilePath { get; set; } + /// Duration of your JFR. 1 min can be represented by 1m or 60s. + public string DurationValue { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Error.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Error.Serialization.cs new file mode 100644 index 0000000000000..e161709aa71c5 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Error.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class Error : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"); + writer.WriteStringValue(Code); + } + if (Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"); + writer.WriteStringValue(Message); + } + writer.WriteEndObject(); + } + + internal static Error DeserializeError(JsonElement element) + { + Optional code = default; + Optional message = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code")) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message")) + { + message = property.Value.GetString(); + continue; + } + } + return new Error(code.Value, message.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Error.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Error.cs new file mode 100644 index 0000000000000..c43b12d62e790 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Error.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 error code compose of code and message. + public partial class Error + { + /// Initializes a new instance of Error. + public Error() + { + } + + /// Initializes a new instance of Error. + /// The code of error. + /// The message of error. + internal Error(string code, string message) + { + Code = code; + Message = message; + } + + /// The code of error. + public string Code { get; set; } + /// The message of error. + public string Message { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayApiMetadataProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayApiMetadataProperties.Serialization.cs new file mode 100644 index 0000000000000..e36fe00f92fdf --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayApiMetadataProperties.Serialization.cs @@ -0,0 +1,90 @@ +// 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 GatewayApiMetadataProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Title)) + { + writer.WritePropertyName("title"); + writer.WriteStringValue(Title); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(Documentation)) + { + writer.WritePropertyName("documentation"); + writer.WriteStringValue(Documentation); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(Version); + } + if (Optional.IsDefined(ServerUri)) + { + writer.WritePropertyName("serverUrl"); + writer.WriteStringValue(ServerUri.AbsoluteUri); + } + writer.WriteEndObject(); + } + + internal static GatewayApiMetadataProperties DeserializeGatewayApiMetadataProperties(JsonElement element) + { + Optional title = default; + Optional description = default; + Optional documentation = default; + Optional version = default; + Optional serverUrl = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("title")) + { + title = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("documentation")) + { + documentation = property.Value.GetString(); + continue; + } + if (property.NameEquals("version")) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("serverUrl")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + serverUrl = null; + continue; + } + serverUrl = new Uri(property.Value.GetString()); + continue; + } + } + return new GatewayApiMetadataProperties(title.Value, description.Value, documentation.Value, version.Value, serverUrl.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayApiMetadataProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayApiMetadataProperties.cs new file mode 100644 index 0000000000000..01d1de696c9ff --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayApiMetadataProperties.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// API metadata property for Spring Cloud Gateway. + public partial class GatewayApiMetadataProperties + { + /// Initializes a new instance of GatewayApiMetadataProperties. + public GatewayApiMetadataProperties() + { + } + + /// Initializes a new instance of GatewayApiMetadataProperties. + /// Title describing the context of the APIs available on the Gateway instance (default: `Spring Cloud Gateway for K8S`). + /// Detailed description of the APIs available on the Gateway instance (default: `Generated OpenAPI 3 document that describes the API routes configured.`). + /// Location of additional documentation for the APIs available on the Gateway instance. + /// Version of APIs available on this Gateway instance (default: `unspecified`). + /// Base URL that API consumers will use to access APIs on the Gateway instance. + internal GatewayApiMetadataProperties(string title, string description, string documentation, string version, Uri serverUri) + { + Title = title; + Description = description; + Documentation = documentation; + Version = version; + ServerUri = serverUri; + } + + /// Title describing the context of the APIs available on the Gateway instance (default: `Spring Cloud Gateway for K8S`). + public string Title { get; set; } + /// Detailed description of the APIs available on the Gateway instance (default: `Generated OpenAPI 3 document that describes the API routes configured.`). + public string Description { get; set; } + /// Location of additional documentation for the APIs available on the Gateway instance. + public string Documentation { get; set; } + /// Version of APIs available on this Gateway instance (default: `unspecified`). + public string Version { get; set; } + /// Base URL that API consumers will use to access APIs on the Gateway instance. + public Uri ServerUri { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayApiRoute.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayApiRoute.Serialization.cs new file mode 100644 index 0000000000000..d75035811c67e --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayApiRoute.Serialization.cs @@ -0,0 +1,195 @@ +// 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 GatewayApiRoute : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Title)) + { + writer.WritePropertyName("title"); + writer.WriteStringValue(Title); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(Uri)) + { + writer.WritePropertyName("uri"); + writer.WriteStringValue(Uri.AbsoluteUri); + } + if (Optional.IsDefined(SsoEnabled)) + { + writer.WritePropertyName("ssoEnabled"); + writer.WriteBooleanValue(SsoEnabled.Value); + } + if (Optional.IsDefined(TokenRelay)) + { + writer.WritePropertyName("tokenRelay"); + writer.WriteBooleanValue(TokenRelay.Value); + } + if (Optional.IsCollectionDefined(Predicates)) + { + writer.WritePropertyName("predicates"); + writer.WriteStartArray(); + foreach (var item in Predicates) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Filters)) + { + writer.WritePropertyName("filters"); + writer.WriteStartArray(); + foreach (var item in Filters) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Order)) + { + writer.WritePropertyName("order"); + writer.WriteNumberValue(Order.Value); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartArray(); + foreach (var item in Tags) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static GatewayApiRoute DeserializeGatewayApiRoute(JsonElement element) + { + Optional title = default; + Optional description = default; + Optional uri = default; + Optional ssoEnabled = default; + Optional tokenRelay = default; + Optional> predicates = default; + Optional> filters = default; + Optional order = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("title")) + { + title = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("uri")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + uri = null; + continue; + } + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("ssoEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + ssoEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("tokenRelay")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + tokenRelay = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("predicates")) + { + 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")) + { + 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; + } + if (property.NameEquals("order")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + order = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + tags = array; + continue; + } + } + return new GatewayApiRoute(title.Value, description.Value, uri.Value, Optional.ToNullable(ssoEnabled), Optional.ToNullable(tokenRelay), Optional.ToList(predicates), Optional.ToList(filters), Optional.ToNullable(order), Optional.ToList(tags)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayApiRoute.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayApiRoute.cs new file mode 100644 index 0000000000000..22539351693a6 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayApiRoute.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 Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// API route config of the Spring Cloud Gateway. + public partial class GatewayApiRoute + { + /// Initializes a new instance of GatewayApiRoute. + public GatewayApiRoute() + { + Predicates = new ChangeTrackingList(); + Filters = new ChangeTrackingList(); + Tags = new ChangeTrackingList(); + } + + /// Initializes a new instance of GatewayApiRoute. + /// A title, will be applied to methods in the generated OpenAPI documentation. + /// A description, will be applied to methods in the generated OpenAPI documentation. + /// Full uri, will override `appName`. + /// Enable sso validation. + /// Pass currently-authenticated user's identity token to application service, default is 'false'. + /// A number of conditions to evaluate a route for each request. 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. + /// Route processing order. + /// Classification tags, will be applied to methods in the generated OpenAPI documentation. + internal GatewayApiRoute(string title, string description, Uri uri, bool? ssoEnabled, bool? tokenRelay, IList predicates, IList filters, int? order, IList tags) + { + Title = title; + Description = description; + Uri = uri; + SsoEnabled = ssoEnabled; + TokenRelay = tokenRelay; + Predicates = predicates; + Filters = filters; + Order = order; + Tags = tags; + } + + /// A title, will be applied to methods in the generated OpenAPI documentation. + public string Title { get; set; } + /// A description, will be applied to methods in the generated OpenAPI documentation. + public string Description { get; set; } + /// Full uri, will override `appName`. + public Uri Uri { get; set; } + /// Enable sso validation. + public bool? SsoEnabled { get; set; } + /// Pass currently-authenticated user's identity token to application service, default is 'false'. + public bool? TokenRelay { get; set; } + /// A number of conditions to evaluate a route for each request. 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. + public IList Filters { get; } + /// Route processing order. + public int? Order { get; set; } + /// Classification tags, will be applied to methods in the generated OpenAPI documentation. + public IList Tags { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCorsProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCorsProperties.Serialization.cs new file mode 100644 index 0000000000000..830524d278eba --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCorsProperties.Serialization.cs @@ -0,0 +1,166 @@ +// 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 GatewayCorsProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(AllowedOrigins)) + { + writer.WritePropertyName("allowedOrigins"); + writer.WriteStartArray(); + foreach (var item in AllowedOrigins) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(AllowedMethods)) + { + writer.WritePropertyName("allowedMethods"); + writer.WriteStartArray(); + foreach (var item in AllowedMethods) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(AllowedHeaders)) + { + writer.WritePropertyName("allowedHeaders"); + writer.WriteStartArray(); + foreach (var item in AllowedHeaders) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(MaxAge)) + { + writer.WritePropertyName("maxAge"); + writer.WriteNumberValue(MaxAge.Value); + } + if (Optional.IsDefined(AllowCredentials)) + { + writer.WritePropertyName("allowCredentials"); + writer.WriteBooleanValue(AllowCredentials.Value); + } + if (Optional.IsCollectionDefined(ExposedHeaders)) + { + writer.WritePropertyName("exposedHeaders"); + writer.WriteStartArray(); + foreach (var item in ExposedHeaders) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static GatewayCorsProperties DeserializeGatewayCorsProperties(JsonElement element) + { + Optional> allowedOrigins = default; + Optional> allowedMethods = default; + Optional> allowedHeaders = default; + Optional maxAge = default; + Optional allowCredentials = default; + Optional> exposedHeaders = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("allowedOrigins")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + allowedOrigins = array; + continue; + } + if (property.NameEquals("allowedMethods")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + allowedMethods = array; + continue; + } + if (property.NameEquals("allowedHeaders")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + allowedHeaders = array; + continue; + } + if (property.NameEquals("maxAge")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + maxAge = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("allowCredentials")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + allowCredentials = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("exposedHeaders")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + exposedHeaders = array; + continue; + } + } + return new GatewayCorsProperties(Optional.ToList(allowedOrigins), Optional.ToList(allowedMethods), Optional.ToList(allowedHeaders), Optional.ToNullable(maxAge), Optional.ToNullable(allowCredentials), Optional.ToList(exposedHeaders)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCorsProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCorsProperties.cs new file mode 100644 index 0000000000000..ec9aae822faa7 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCorsProperties.cs @@ -0,0 +1,55 @@ +// 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 +{ + /// Cross-Origin Resource Sharing property. + public partial class GatewayCorsProperties + { + /// Initializes a new instance of GatewayCorsProperties. + public GatewayCorsProperties() + { + AllowedOrigins = new ChangeTrackingList(); + AllowedMethods = new ChangeTrackingList(); + AllowedHeaders = new ChangeTrackingList(); + ExposedHeaders = new ChangeTrackingList(); + } + + /// Initializes a new instance of GatewayCorsProperties. + /// Allowed origins to make cross-site requests. The special value `*` allows all domains. + /// Allowed HTTP methods on cross-site requests. The special value `*` allows all methods. If not set, `GET` and `HEAD` are allowed by default. + /// Allowed headers in cross-site requests. The special value `*` allows actual requests to send any header. + /// How long, in seconds, the response from a pre-flight request can be cached by clients. + /// Whether user credentials are supported on cross-site requests. Valid values: `true`, `false`. + /// HTTP response headers to expose for cross-site requests. + internal GatewayCorsProperties(IList allowedOrigins, IList allowedMethods, IList allowedHeaders, int? maxAge, bool? allowCredentials, IList exposedHeaders) + { + AllowedOrigins = allowedOrigins; + AllowedMethods = allowedMethods; + AllowedHeaders = allowedHeaders; + MaxAge = maxAge; + AllowCredentials = allowCredentials; + ExposedHeaders = exposedHeaders; + } + + /// Allowed origins to make cross-site requests. The special value `*` allows all domains. + public IList AllowedOrigins { get; } + /// Allowed HTTP methods on cross-site requests. The special value `*` allows all methods. If not set, `GET` and `HEAD` are allowed by default. + public IList AllowedMethods { get; } + /// Allowed headers in cross-site requests. The special value `*` allows actual requests to send any header. + public IList AllowedHeaders { get; } + /// How long, in seconds, the response from a pre-flight request can be cached by clients. + public int? MaxAge { get; set; } + /// Whether user credentials are supported on cross-site requests. Valid values: `true`, `false`. + public bool? AllowCredentials { get; set; } + /// HTTP response headers to expose for cross-site requests. + public IList ExposedHeaders { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainProperties.Serialization.cs new file mode 100644 index 0000000000000..57b85e5bdfa9e --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainProperties.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class GatewayCustomDomainProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Thumbprint)) + { + writer.WritePropertyName("thumbprint"); + writer.WriteStringValue(Thumbprint); + } + writer.WriteEndObject(); + } + + internal static GatewayCustomDomainProperties DeserializeGatewayCustomDomainProperties(JsonElement element) + { + Optional thumbprint = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("thumbprint")) + { + thumbprint = property.Value.GetString(); + continue; + } + } + return new GatewayCustomDomainProperties(thumbprint.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainProperties.cs new file mode 100644 index 0000000000000..e05ad282e21dc --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainProperties.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// The properties of custom domain for Spring Cloud Gateway. + internal partial class GatewayCustomDomainProperties + { + /// Initializes a new instance of GatewayCustomDomainProperties. + public GatewayCustomDomainProperties() + { + } + + /// Initializes a new instance of GatewayCustomDomainProperties. + /// The thumbprint of bound certificate. + internal GatewayCustomDomainProperties(string thumbprint) + { + Thumbprint = thumbprint; + } + + /// The thumbprint of bound certificate. + public string Thumbprint { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainResourceCollection.Serialization.cs new file mode 100644 index 0000000000000..49df9828a68a7 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainResourceCollection.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class GatewayCustomDomainResourceCollection + { + internal static GatewayCustomDomainResourceCollection DeserializeGatewayCustomDomainResourceCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(GatewayCustomDomainResourceData.DeserializeGatewayCustomDomainResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new GatewayCustomDomainResourceCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainResourceCollection.cs new file mode 100644 index 0000000000000..6a6608c5655b3 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainResourceCollection.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 Spring Cloud Gateway custom domain resources and a possible link for next set. + internal partial class GatewayCustomDomainResourceCollection + { + /// Initializes a new instance of GatewayCustomDomainResourceCollection. + internal GatewayCustomDomainResourceCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of GatewayCustomDomainResourceCollection. + /// Collection of Spring Cloud Gateway custom domain resources. + /// + /// URL client should use to fetch the next page (per server side paging). + /// It's null for now, added for future use. + /// + internal GatewayCustomDomainResourceCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of Spring Cloud Gateway custom domain 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/GatewayCustomDomainResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainResourceData.Serialization.cs new file mode 100644 index 0000000000000..7050e538cf3b3 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainResourceData.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; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + public partial class GatewayCustomDomainResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + + internal static GatewayCustomDomainResourceData DeserializeGatewayCustomDomainResourceData(JsonElement element) + { + Optional properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = GatewayCustomDomainProperties.DeserializeGatewayCustomDomainProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new GatewayCustomDomainResourceData(id, name, type, systemData, properties.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayInstance.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayInstance.Serialization.cs new file mode 100644 index 0000000000000..6a5960a4c4c34 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayInstance.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class GatewayInstance + { + internal static GatewayInstance DeserializeGatewayInstance(JsonElement element) + { + Optional name = default; + Optional status = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("status")) + { + status = property.Value.GetString(); + continue; + } + } + return new GatewayInstance(name.Value, status.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayInstance.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayInstance.cs new file mode 100644 index 0000000000000..fc76326b12559 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayInstance.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 Spring Cloud Gateway. + public partial class GatewayInstance + { + /// Initializes a new instance of GatewayInstance. + internal GatewayInstance() + { + } + + /// Initializes a new instance of GatewayInstance. + /// Name of the Spring Cloud Gateway instance. + /// Status of the Spring Cloud Gateway instance. + internal GatewayInstance(string name, string status) + { + Name = name; + Status = status; + } + + /// Name of the Spring Cloud Gateway instance. + public string Name { get; } + /// Status of the Spring Cloud Gateway instance. + public string Status { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayOperatorProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayOperatorProperties.Serialization.cs new file mode 100644 index 0000000000000..3820864498295 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayOperatorProperties.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; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class GatewayOperatorProperties + { + internal static GatewayOperatorProperties DeserializeGatewayOperatorProperties(JsonElement element) + { + Optional resourceRequests = default; + Optional> instances = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceRequests")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + resourceRequests = GatewayOperatorResourceRequests.DeserializeGatewayOperatorResourceRequests(property.Value); + continue; + } + if (property.NameEquals("instances")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(GatewayInstance.DeserializeGatewayInstance(item)); + } + instances = array; + continue; + } + } + return new GatewayOperatorProperties(resourceRequests.Value, Optional.ToList(instances)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayOperatorProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayOperatorProperties.cs new file mode 100644 index 0000000000000..ef2f821dd8f25 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayOperatorProperties.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 +{ + /// Properties of the Spring Cloud Gateway Operator. + public partial class GatewayOperatorProperties + { + /// Initializes a new instance of GatewayOperatorProperties. + internal GatewayOperatorProperties() + { + Instances = new ChangeTrackingList(); + } + + /// Initializes a new instance of GatewayOperatorProperties. + /// The requested resource quantity for required CPU and Memory. + /// Collection of instances belong to Spring Cloud Gateway operator. + internal GatewayOperatorProperties(GatewayOperatorResourceRequests resourceRequests, IReadOnlyList instances) + { + ResourceRequests = resourceRequests; + Instances = instances; + } + + /// The requested resource quantity for required CPU and Memory. + public GatewayOperatorResourceRequests ResourceRequests { get; } + /// Collection of instances belong to Spring Cloud Gateway operator. + public IReadOnlyList Instances { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayOperatorResourceRequests.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayOperatorResourceRequests.Serialization.cs new file mode 100644 index 0000000000000..050f36144a5b6 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayOperatorResourceRequests.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class GatewayOperatorResourceRequests + { + internal static GatewayOperatorResourceRequests DeserializeGatewayOperatorResourceRequests(JsonElement element) + { + Optional cpu = default; + Optional memory = default; + Optional instanceCount = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("cpu")) + { + cpu = property.Value.GetString(); + continue; + } + if (property.NameEquals("memory")) + { + memory = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + instanceCount = property.Value.GetInt32(); + continue; + } + } + return new GatewayOperatorResourceRequests(cpu.Value, memory.Value, Optional.ToNullable(instanceCount)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayOperatorResourceRequests.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayOperatorResourceRequests.cs new file mode 100644 index 0000000000000..9319b5e3b3608 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayOperatorResourceRequests.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Properties of the Spring Cloud Gateway Operator. + public partial class GatewayOperatorResourceRequests + { + /// Initializes a new instance of GatewayOperatorResourceRequests. + internal GatewayOperatorResourceRequests() + { + } + + /// Initializes a new instance of GatewayOperatorResourceRequests. + /// Cpu allocated to each Spring Cloud Gateway Operator instance. + /// Memory allocated to each Spring Cloud Gateway Operator instance. + /// Instance count of the Spring Cloud Gateway Operator. + internal GatewayOperatorResourceRequests(string cpu, string memory, int? instanceCount) + { + Cpu = cpu; + Memory = memory; + InstanceCount = instanceCount; + } + + /// Cpu allocated to each Spring Cloud Gateway Operator instance. + public string Cpu { get; } + /// Memory allocated to each Spring Cloud Gateway Operator instance. + public string Memory { get; } + /// Instance count of the Spring Cloud Gateway Operator. + public int? InstanceCount { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayProperties.Serialization.cs new file mode 100644 index 0000000000000..277c080760cbc --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayProperties.Serialization.cs @@ -0,0 +1,176 @@ +// 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 GatewayProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Public)) + { + writer.WritePropertyName("public"); + writer.WriteBooleanValue(Public.Value); + } + if (Optional.IsDefined(HttpsOnly)) + { + writer.WritePropertyName("httpsOnly"); + writer.WriteBooleanValue(HttpsOnly.Value); + } + if (Optional.IsDefined(SsoProperties)) + { + writer.WritePropertyName("ssoProperties"); + writer.WriteObjectValue(SsoProperties); + } + if (Optional.IsDefined(ApiMetadataProperties)) + { + writer.WritePropertyName("apiMetadataProperties"); + writer.WriteObjectValue(ApiMetadataProperties); + } + if (Optional.IsDefined(CorsProperties)) + { + writer.WritePropertyName("corsProperties"); + writer.WriteObjectValue(CorsProperties); + } + if (Optional.IsDefined(ResourceRequests)) + { + writer.WritePropertyName("resourceRequests"); + writer.WriteObjectValue(ResourceRequests); + } + writer.WriteEndObject(); + } + + internal static GatewayProperties DeserializeGatewayProperties(JsonElement element) + { + Optional provisioningState = default; + Optional @public = default; + Optional url = default; + Optional httpsOnly = default; + Optional ssoProperties = default; + Optional apiMetadataProperties = default; + Optional corsProperties = default; + Optional resourceRequests = default; + Optional> instances = default; + Optional operatorProperties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new GatewayProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("public")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + @public = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("url")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + url = null; + continue; + } + url = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("httpsOnly")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + httpsOnly = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("ssoProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + ssoProperties = SsoProperties.DeserializeSsoProperties(property.Value); + continue; + } + if (property.NameEquals("apiMetadataProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + apiMetadataProperties = GatewayApiMetadataProperties.DeserializeGatewayApiMetadataProperties(property.Value); + continue; + } + if (property.NameEquals("corsProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + corsProperties = GatewayCorsProperties.DeserializeGatewayCorsProperties(property.Value); + continue; + } + if (property.NameEquals("resourceRequests")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + resourceRequests = GatewayResourceRequests.DeserializeGatewayResourceRequests(property.Value); + continue; + } + if (property.NameEquals("instances")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(GatewayInstance.DeserializeGatewayInstance(item)); + } + instances = array; + continue; + } + if (property.NameEquals("operatorProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + operatorProperties = GatewayOperatorProperties.DeserializeGatewayOperatorProperties(property.Value); + continue; + } + } + return new GatewayProperties(Optional.ToNullable(provisioningState), Optional.ToNullable(@public), url.Value, Optional.ToNullable(httpsOnly), ssoProperties.Value, apiMetadataProperties.Value, corsProperties.Value, resourceRequests.Value, Optional.ToList(instances), operatorProperties.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayProperties.cs new file mode 100644 index 0000000000000..a657cd59176c8 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayProperties.cs @@ -0,0 +1,69 @@ +// 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 +{ + /// Spring Cloud Gateway properties payload. + public partial class GatewayProperties + { + /// Initializes a new instance of GatewayProperties. + public GatewayProperties() + { + Instances = new ChangeTrackingList(); + } + + /// Initializes a new instance of GatewayProperties. + /// State of the Spring Cloud Gateway. + /// Indicates whether the Spring Cloud Gateway exposes endpoint. + /// URL of the Spring Cloud Gateway, exposed when 'public' is true. + /// Indicate if only https is allowed. + /// Single sign-on related configuration. + /// API metadata property for Spring Cloud Gateway. + /// Cross-Origin Resource Sharing property. + /// 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 GatewayProperties(GatewayProvisioningState? provisioningState, bool? @public, Uri uri, bool? httpsOnly, SsoProperties ssoProperties, GatewayApiMetadataProperties apiMetadataProperties, GatewayCorsProperties corsProperties, GatewayResourceRequests resourceRequests, IReadOnlyList instances, GatewayOperatorProperties operatorProperties) + { + ProvisioningState = provisioningState; + Public = @public; + Uri = uri; + HttpsOnly = httpsOnly; + SsoProperties = ssoProperties; + ApiMetadataProperties = apiMetadataProperties; + CorsProperties = corsProperties; + ResourceRequests = resourceRequests; + Instances = instances; + OperatorProperties = operatorProperties; + } + + /// State of the Spring Cloud Gateway. + public GatewayProvisioningState? ProvisioningState { get; } + /// Indicates whether the Spring Cloud Gateway exposes endpoint. + public bool? Public { get; set; } + /// URL of the Spring Cloud Gateway, exposed when 'public' is true. + public Uri Uri { get; } + /// Indicate if only https is allowed. + public bool? HttpsOnly { get; set; } + /// Single sign-on related configuration. + public SsoProperties SsoProperties { get; set; } + /// API metadata property for Spring Cloud Gateway. + public GatewayApiMetadataProperties ApiMetadataProperties { get; set; } + /// Cross-Origin Resource Sharing property. + public GatewayCorsProperties CorsProperties { get; set; } + /// The requested resource quantity for required CPU and Memory. + public GatewayResourceRequests ResourceRequests { get; set; } + /// Collection of instances belong to Spring Cloud Gateway. + public IReadOnlyList Instances { get; } + /// Properties of the Spring Cloud Gateway Operator. + public GatewayOperatorProperties OperatorProperties { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayProvisioningState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayProvisioningState.cs new file mode 100644 index 0000000000000..9e89008714bf9 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayProvisioningState.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 Spring Cloud Gateway. + public readonly partial struct GatewayProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public GatewayProvisioningState(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 GatewayProvisioningState Creating { get; } = new GatewayProvisioningState(CreatingValue); + /// Updating. + public static GatewayProvisioningState Updating { get; } = new GatewayProvisioningState(UpdatingValue); + /// Succeeded. + public static GatewayProvisioningState Succeeded { get; } = new GatewayProvisioningState(SucceededValue); + /// Failed. + public static GatewayProvisioningState Failed { get; } = new GatewayProvisioningState(FailedValue); + /// Deleting. + public static GatewayProvisioningState Deleting { get; } = new GatewayProvisioningState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(GatewayProvisioningState left, GatewayProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(GatewayProvisioningState left, GatewayProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator GatewayProvisioningState(string value) => new GatewayProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is GatewayProvisioningState other && Equals(other); + /// + public bool Equals(GatewayProvisioningState 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/GatewayResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceCollection.Serialization.cs new file mode 100644 index 0000000000000..039e4b97cfd67 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceCollection.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class GatewayResourceCollection + { + internal static GatewayResourceCollection DeserializeGatewayResourceCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(GatewayResourceData.DeserializeGatewayResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new GatewayResourceCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceCollection.cs new file mode 100644 index 0000000000000..32e9bb9e114b3 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceCollection.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 gateway resources and a possible link for next set. + internal partial class GatewayResourceCollection + { + /// Initializes a new instance of GatewayResourceCollection. + internal GatewayResourceCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of GatewayResourceCollection. + /// Collection of gateway resources. + /// + /// URL client should use to fetch the next page (per server side paging). + /// It's null for now, added for future use. + /// + internal GatewayResourceCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of gateway 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/GatewayResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceData.Serialization.cs new file mode 100644 index 0000000000000..cf9a50708077b --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceData.Serialization.cs @@ -0,0 +1,87 @@ +// 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 GatewayResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"); + writer.WriteObjectValue(Sku); + } + writer.WriteEndObject(); + } + + internal static GatewayResourceData DeserializeGatewayResourceData(JsonElement element) + { + Optional properties = default; + Optional sku = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = GatewayProperties.DeserializeGatewayProperties(property.Value); + continue; + } + if (property.NameEquals("sku")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sku = AppPlatformSku.DeserializeAppPlatformSku(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new GatewayResourceData(id, name, type, systemData, properties.Value, sku.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceRequests.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceRequests.Serialization.cs new file mode 100644 index 0000000000000..99253687e805e --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceRequests.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class GatewayResourceRequests : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Cpu)) + { + writer.WritePropertyName("cpu"); + writer.WriteStringValue(Cpu); + } + if (Optional.IsDefined(Memory)) + { + writer.WritePropertyName("memory"); + writer.WriteStringValue(Memory); + } + writer.WriteEndObject(); + } + + internal static GatewayResourceRequests DeserializeGatewayResourceRequests(JsonElement element) + { + Optional cpu = default; + Optional memory = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("cpu")) + { + cpu = property.Value.GetString(); + continue; + } + if (property.NameEquals("memory")) + { + memory = property.Value.GetString(); + continue; + } + } + return new GatewayResourceRequests(cpu.Value, memory.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceRequests.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceRequests.cs new file mode 100644 index 0000000000000..1ce002f55e2ff --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceRequests.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Resource request payload of Spring Cloud Gateway. + public partial class GatewayResourceRequests + { + /// Initializes a new instance of GatewayResourceRequests. + public GatewayResourceRequests() + { + } + + /// Initializes a new instance of GatewayResourceRequests. + /// Cpu allocated to each Spring Cloud Gateway instance. + /// Memory allocated to each Spring Cloud Gateway instance. + internal GatewayResourceRequests(string cpu, string memory) + { + Cpu = cpu; + Memory = memory; + } + + /// Cpu allocated to each Spring Cloud Gateway instance. + public string Cpu { get; set; } + /// Memory allocated to each Spring Cloud Gateway instance. + public string Memory { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigProperties.Serialization.cs new file mode 100644 index 0000000000000..3e7578832c5a2 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigProperties.Serialization.cs @@ -0,0 +1,78 @@ +// 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 GatewayRouteConfigProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AppResourceId)) + { + writer.WritePropertyName("appResourceId"); + writer.WriteStringValue(AppResourceId); + } + if (Optional.IsCollectionDefined(Routes)) + { + writer.WritePropertyName("routes"); + writer.WriteStartArray(); + foreach (var item in Routes) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static GatewayRouteConfigProperties DeserializeGatewayRouteConfigProperties(JsonElement element) + { + Optional provisioningState = default; + Optional appResourceId = default; + Optional> routes = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new GatewayProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("appResourceId")) + { + appResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("routes")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(GatewayApiRoute.DeserializeGatewayApiRoute(item)); + } + routes = array; + continue; + } + } + return new GatewayRouteConfigProperties(Optional.ToNullable(provisioningState), appResourceId.Value, Optional.ToList(routes)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigProperties.cs new file mode 100644 index 0000000000000..ffc30ca7bb4d9 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigProperties.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 +{ + /// API route config of the Spring Cloud Gateway. + public partial class GatewayRouteConfigProperties + { + /// Initializes a new instance of GatewayRouteConfigProperties. + public GatewayRouteConfigProperties() + { + Routes = new ChangeTrackingList(); + } + + /// Initializes a new instance of GatewayRouteConfigProperties. + /// State of the Spring Cloud Gateway route config. + /// The resource Id of the Azure Spring Cloud app, required unless route defines `uri`. + /// Array of API routes, each route contains properties such as `title`, `uri`, `ssoEnabled`, `predicates`, `filters`. + internal GatewayRouteConfigProperties(GatewayProvisioningState? provisioningState, string appResourceId, IList routes) + { + ProvisioningState = provisioningState; + AppResourceId = appResourceId; + Routes = routes; + } + + /// State of the Spring Cloud Gateway route config. + public GatewayProvisioningState? ProvisioningState { get; } + /// The resource Id of the Azure Spring Cloud app, required unless route defines `uri`. + public string AppResourceId { get; set; } + /// Array of API routes, each route contains properties such as `title`, `uri`, `ssoEnabled`, `predicates`, `filters`. + public IList Routes { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigResourceCollection.Serialization.cs new file mode 100644 index 0000000000000..e99486fd5e961 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigResourceCollection.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class GatewayRouteConfigResourceCollection + { + internal static GatewayRouteConfigResourceCollection DeserializeGatewayRouteConfigResourceCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(GatewayRouteConfigResourceData.DeserializeGatewayRouteConfigResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new GatewayRouteConfigResourceCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigResourceCollection.cs new file mode 100644 index 0000000000000..6c6d09fe1d169 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigResourceCollection.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 Spring Cloud Gateway route config resources and a possible link for next set. + internal partial class GatewayRouteConfigResourceCollection + { + /// Initializes a new instance of GatewayRouteConfigResourceCollection. + internal GatewayRouteConfigResourceCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of GatewayRouteConfigResourceCollection. + /// Collection of Spring Cloud Gateway route config resources. + /// + /// URL client should use to fetch the next page (per server side paging). + /// It's null for now, added for future use. + /// + internal GatewayRouteConfigResourceCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of Spring Cloud Gateway route config 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/GatewayRouteConfigResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigResourceData.Serialization.cs new file mode 100644 index 0000000000000..e2cc503fcfff9 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigResourceData.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; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + public partial class GatewayRouteConfigResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + + internal static GatewayRouteConfigResourceData DeserializeGatewayRouteConfigResourceData(JsonElement element) + { + Optional properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = GatewayRouteConfigProperties.DeserializeGatewayRouteConfigProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new GatewayRouteConfigResourceData(id, name, type, systemData, properties.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GitPatternRepository.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GitPatternRepository.Serialization.cs new file mode 100644 index 0000000000000..856791c20f6c1 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GitPatternRepository.Serialization.cs @@ -0,0 +1,181 @@ +// 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 GitPatternRepository : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + if (Optional.IsCollectionDefined(Pattern)) + { + writer.WritePropertyName("pattern"); + writer.WriteStartArray(); + foreach (var item in Pattern) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("uri"); + writer.WriteStringValue(Uri.AbsoluteUri); + if (Optional.IsDefined(Label)) + { + writer.WritePropertyName("label"); + writer.WriteStringValue(Label); + } + if (Optional.IsCollectionDefined(SearchPaths)) + { + writer.WritePropertyName("searchPaths"); + writer.WriteStartArray(); + foreach (var item in SearchPaths) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Username)) + { + writer.WritePropertyName("username"); + writer.WriteStringValue(Username); + } + if (Optional.IsDefined(Password)) + { + writer.WritePropertyName("password"); + writer.WriteStringValue(Password); + } + if (Optional.IsDefined(HostKey)) + { + writer.WritePropertyName("hostKey"); + writer.WriteStringValue(HostKey); + } + if (Optional.IsDefined(HostKeyAlgorithm)) + { + writer.WritePropertyName("hostKeyAlgorithm"); + writer.WriteStringValue(HostKeyAlgorithm); + } + if (Optional.IsDefined(PrivateKey)) + { + writer.WritePropertyName("privateKey"); + writer.WriteStringValue(PrivateKey); + } + if (Optional.IsDefined(StrictHostKeyChecking)) + { + writer.WritePropertyName("strictHostKeyChecking"); + writer.WriteBooleanValue(StrictHostKeyChecking.Value); + } + writer.WriteEndObject(); + } + + internal static GitPatternRepository DeserializeGitPatternRepository(JsonElement element) + { + string name = default; + Optional> pattern = default; + Uri uri = default; + Optional label = default; + Optional> searchPaths = default; + Optional username = default; + Optional password = default; + Optional hostKey = default; + Optional hostKeyAlgorithm = default; + Optional privateKey = default; + Optional strictHostKeyChecking = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("pattern")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + pattern = array; + continue; + } + if (property.NameEquals("uri")) + { + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("label")) + { + label = property.Value.GetString(); + continue; + } + if (property.NameEquals("searchPaths")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + searchPaths = array; + continue; + } + if (property.NameEquals("username")) + { + username = property.Value.GetString(); + continue; + } + if (property.NameEquals("password")) + { + password = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostKey")) + { + hostKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostKeyAlgorithm")) + { + hostKeyAlgorithm = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateKey")) + { + privateKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("strictHostKeyChecking")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + strictHostKeyChecking = property.Value.GetBoolean(); + continue; + } + } + return new GitPatternRepository(name, Optional.ToList(pattern), uri, label.Value, Optional.ToList(searchPaths), username.Value, password.Value, hostKey.Value, hostKeyAlgorithm.Value, privateKey.Value, Optional.ToNullable(strictHostKeyChecking)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GitPatternRepository.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GitPatternRepository.cs new file mode 100644 index 0000000000000..c6ac0e9dc6e9c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GitPatternRepository.cs @@ -0,0 +1,88 @@ +// 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 +{ + /// Git repository property payload for config server. + public partial class GitPatternRepository + { + /// Initializes a new instance of GitPatternRepository. + /// Name of the repository. + /// URI of the repository. + /// or is null. + public GitPatternRepository(string name, Uri uri) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (uri == null) + { + throw new ArgumentNullException(nameof(uri)); + } + + Name = name; + Pattern = new ChangeTrackingList(); + Uri = uri; + SearchPaths = new ChangeTrackingList(); + } + + /// Initializes a new instance of GitPatternRepository. + /// Name of the repository. + /// Collection of pattern of the repository. + /// URI of the repository. + /// Label of the repository. + /// Searching path of the repository. + /// Username of git repository basic auth. + /// Password of git repository basic auth. + /// Public sshKey of git repository. + /// SshKey algorithm of git repository. + /// Private sshKey algorithm of git repository. + /// Strict host key checking or not. + internal GitPatternRepository(string name, IList pattern, Uri uri, string label, IList searchPaths, string username, string password, string hostKey, string hostKeyAlgorithm, string privateKey, bool? strictHostKeyChecking) + { + Name = name; + Pattern = pattern; + Uri = uri; + Label = label; + SearchPaths = searchPaths; + Username = username; + Password = password; + HostKey = hostKey; + HostKeyAlgorithm = hostKeyAlgorithm; + PrivateKey = privateKey; + StrictHostKeyChecking = strictHostKeyChecking; + } + + /// Name of the repository. + public string Name { get; set; } + /// Collection of pattern of the repository. + public IList Pattern { get; } + /// URI of the repository. + public Uri Uri { get; set; } + /// Label of the repository. + public string Label { get; set; } + /// Searching path of the repository. + public IList SearchPaths { get; } + /// Username of git repository basic auth. + public string Username { get; set; } + /// Password of git repository basic auth. + public string Password { get; set; } + /// Public sshKey of git repository. + public string HostKey { get; set; } + /// SshKey algorithm of git repository. + public string HostKeyAlgorithm { get; set; } + /// Private sshKey algorithm of git repository. + public string PrivateKey { get; set; } + /// Strict host key checking or not. + public bool? StrictHostKeyChecking { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ImageRegistryCredential.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ImageRegistryCredential.Serialization.cs new file mode 100644 index 0000000000000..7a11b7ff15306 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ImageRegistryCredential.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class ImageRegistryCredential : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Username)) + { + writer.WritePropertyName("username"); + writer.WriteStringValue(Username); + } + if (Optional.IsDefined(Password)) + { + writer.WritePropertyName("password"); + writer.WriteStringValue(Password); + } + writer.WriteEndObject(); + } + + internal static ImageRegistryCredential DeserializeImageRegistryCredential(JsonElement element) + { + Optional username = default; + Optional password = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("username")) + { + username = property.Value.GetString(); + continue; + } + if (property.NameEquals("password")) + { + password = property.Value.GetString(); + continue; + } + } + return new ImageRegistryCredential(username.Value, password.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ImageRegistryCredential.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ImageRegistryCredential.cs new file mode 100644 index 0000000000000..d09404a05ffdc --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ImageRegistryCredential.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Credential of the image registry. + public partial class ImageRegistryCredential + { + /// Initializes a new instance of ImageRegistryCredential. + public ImageRegistryCredential() + { + } + + /// Initializes a new instance of ImageRegistryCredential. + /// The username of the image registry credential. + /// The password of the image registry credential. + internal ImageRegistryCredential(string username, string password) + { + Username = username; + Password = password; + } + + /// The username of the image registry credential. + public string Username { get; set; } + /// The password of the image registry credential. + public string Password { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/JarUploadedUserSourceInfo.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/JarUploadedUserSourceInfo.Serialization.cs new file mode 100644 index 0000000000000..9ed388b83f896 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/JarUploadedUserSourceInfo.Serialization.cs @@ -0,0 +1,81 @@ +// 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 JarUploadedUserSourceInfo : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(RuntimeVersion)) + { + writer.WritePropertyName("runtimeVersion"); + writer.WriteStringValue(RuntimeVersion); + } + if (Optional.IsDefined(JvmOptions)) + { + writer.WritePropertyName("jvmOptions"); + writer.WriteStringValue(JvmOptions); + } + if (Optional.IsDefined(RelativePath)) + { + writer.WritePropertyName("relativePath"); + writer.WriteStringValue(RelativePath); + } + writer.WritePropertyName("type"); + writer.WriteStringValue(UserSourceInfoType); + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(Version); + } + writer.WriteEndObject(); + } + + internal static JarUploadedUserSourceInfo DeserializeJarUploadedUserSourceInfo(JsonElement element) + { + Optional runtimeVersion = default; + Optional jvmOptions = default; + Optional relativePath = default; + string type = default; + Optional version = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("runtimeVersion")) + { + runtimeVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("jvmOptions")) + { + jvmOptions = property.Value.GetString(); + continue; + } + if (property.NameEquals("relativePath")) + { + relativePath = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("version")) + { + version = property.Value.GetString(); + continue; + } + } + return new JarUploadedUserSourceInfo(type, version.Value, relativePath.Value, runtimeVersion.Value, jvmOptions.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/JarUploadedUserSourceInfo.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/JarUploadedUserSourceInfo.cs new file mode 100644 index 0000000000000..f2f235d330490 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/JarUploadedUserSourceInfo.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Uploaded Jar binary for a deployment. + public partial class JarUploadedUserSourceInfo : UploadedUserSourceInfo + { + /// Initializes a new instance of JarUploadedUserSourceInfo. + public JarUploadedUserSourceInfo() + { + UserSourceInfoType = "Jar"; + } + + /// Initializes a new instance of JarUploadedUserSourceInfo. + /// Type of the source uploaded. + /// Version of the source. + /// Relative path of the storage which stores the source. + /// Runtime version of the Jar file. + /// JVM parameter. + internal JarUploadedUserSourceInfo(string userSourceInfoType, string version, string relativePath, string runtimeVersion, string jvmOptions) : base(userSourceInfoType, version, relativePath) + { + RuntimeVersion = runtimeVersion; + JvmOptions = jvmOptions; + UserSourceInfoType = userSourceInfoType ?? "Jar"; + } + + /// Runtime version of the Jar file. + public string RuntimeVersion { get; set; } + /// JVM parameter. + public string JvmOptions { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/KPackBuildStageProvisioningState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/KPackBuildStageProvisioningState.cs new file mode 100644 index 0000000000000..94dd908ab5e57 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/KPackBuildStageProvisioningState.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 +{ + /// The provisioning state of this build stage resource. + public readonly partial struct KPackBuildStageProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public KPackBuildStageProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotStartedValue = "NotStarted"; + private const string RunningValue = "Running"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + + /// NotStarted. + public static KPackBuildStageProvisioningState NotStarted { get; } = new KPackBuildStageProvisioningState(NotStartedValue); + /// Running. + public static KPackBuildStageProvisioningState Running { get; } = new KPackBuildStageProvisioningState(RunningValue); + /// Succeeded. + public static KPackBuildStageProvisioningState Succeeded { get; } = new KPackBuildStageProvisioningState(SucceededValue); + /// Failed. + public static KPackBuildStageProvisioningState Failed { get; } = new KPackBuildStageProvisioningState(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(KPackBuildStageProvisioningState left, KPackBuildStageProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(KPackBuildStageProvisioningState left, KPackBuildStageProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator KPackBuildStageProvisioningState(string value) => new KPackBuildStageProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is KPackBuildStageProvisioningState other && Equals(other); + /// + public bool Equals(KPackBuildStageProvisioningState 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/KeyVaultCertificateProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/KeyVaultCertificateProperties.Serialization.cs new file mode 100644 index 0000000000000..bd48686d344ad --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/KeyVaultCertificateProperties.Serialization.cs @@ -0,0 +1,134 @@ +// 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 KeyVaultCertificateProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("vaultUri"); + writer.WriteStringValue(VaultUri.AbsoluteUri); + writer.WritePropertyName("keyVaultCertName"); + writer.WriteStringValue(KeyVaultCertName); + if (Optional.IsDefined(CertVersion)) + { + writer.WritePropertyName("certVersion"); + writer.WriteStringValue(CertVersion); + } + if (Optional.IsDefined(ExcludePrivateKey)) + { + writer.WritePropertyName("excludePrivateKey"); + writer.WriteBooleanValue(ExcludePrivateKey.Value); + } + writer.WritePropertyName("type"); + writer.WriteStringValue(CertificatePropertiesType); + writer.WriteEndObject(); + } + + internal static KeyVaultCertificateProperties DeserializeKeyVaultCertificateProperties(JsonElement element) + { + Uri vaultUri = default; + string keyVaultCertName = default; + Optional certVersion = default; + Optional excludePrivateKey = default; + string type = default; + Optional thumbprint = default; + Optional issuer = default; + Optional issuedDate = default; + Optional expirationDate = default; + Optional activateDate = default; + Optional subjectName = default; + Optional> dnsNames = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vaultUri")) + { + vaultUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("keyVaultCertName")) + { + keyVaultCertName = property.Value.GetString(); + continue; + } + if (property.NameEquals("certVersion")) + { + certVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("excludePrivateKey")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + excludePrivateKey = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("thumbprint")) + { + thumbprint = property.Value.GetString(); + continue; + } + if (property.NameEquals("issuer")) + { + issuer = property.Value.GetString(); + continue; + } + if (property.NameEquals("issuedDate")) + { + issuedDate = property.Value.GetString(); + continue; + } + if (property.NameEquals("expirationDate")) + { + expirationDate = property.Value.GetString(); + continue; + } + if (property.NameEquals("activateDate")) + { + activateDate = property.Value.GetString(); + continue; + } + if (property.NameEquals("subjectName")) + { + subjectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("dnsNames")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + dnsNames = array; + continue; + } + } + return new KeyVaultCertificateProperties(type, thumbprint.Value, issuer.Value, issuedDate.Value, expirationDate.Value, activateDate.Value, subjectName.Value, Optional.ToList(dnsNames), vaultUri, keyVaultCertName, certVersion.Value, Optional.ToNullable(excludePrivateKey)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/KeyVaultCertificateProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/KeyVaultCertificateProperties.cs new file mode 100644 index 0000000000000..5e8bac43558fb --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/KeyVaultCertificateProperties.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; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Properties of certificate imported from key vault. + public partial class KeyVaultCertificateProperties : CertificateProperties + { + /// Initializes a new instance of KeyVaultCertificateProperties. + /// The vault uri of user key vault. + /// The certificate name of key vault. + /// or is null. + public KeyVaultCertificateProperties(Uri vaultUri, string keyVaultCertName) + { + if (vaultUri == null) + { + throw new ArgumentNullException(nameof(vaultUri)); + } + if (keyVaultCertName == null) + { + throw new ArgumentNullException(nameof(keyVaultCertName)); + } + + VaultUri = vaultUri; + KeyVaultCertName = keyVaultCertName; + CertificatePropertiesType = "KeyVaultCertificate"; + } + + /// Initializes a new instance of KeyVaultCertificateProperties. + /// The type of the certificate source. + /// The thumbprint of certificate. + /// The issuer of certificate. + /// The issue date of certificate. + /// The expiration date of certificate. + /// The activate date of certificate. + /// The subject name of certificate. + /// The domain list of certificate. + /// The vault uri of user key vault. + /// The certificate name of key vault. + /// The certificate version of key vault. + /// Optional. If set to true, it will not import private key from key vault. + internal KeyVaultCertificateProperties(string certificatePropertiesType, string thumbprint, string issuer, string issuedDate, string expirationDate, string activateDate, string subjectName, IReadOnlyList dnsNames, Uri vaultUri, string keyVaultCertName, string certVersion, bool? excludePrivateKey) : base(certificatePropertiesType, thumbprint, issuer, issuedDate, expirationDate, activateDate, subjectName, dnsNames) + { + VaultUri = vaultUri; + KeyVaultCertName = keyVaultCertName; + CertVersion = certVersion; + ExcludePrivateKey = excludePrivateKey; + CertificatePropertiesType = certificatePropertiesType ?? "KeyVaultCertificate"; + } + + /// The vault uri of user key vault. + public Uri VaultUri { get; set; } + /// The certificate name of key vault. + public string KeyVaultCertName { get; set; } + /// The certificate version of key vault. + public string CertVersion { get; set; } + /// Optional. If set to true, it will not import private key from key vault. + public bool? ExcludePrivateKey { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LoadedCertificate.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LoadedCertificate.Serialization.cs new file mode 100644 index 0000000000000..fce9ff7431d4e --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LoadedCertificate.Serialization.cs @@ -0,0 +1,53 @@ +// 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 LoadedCertificate : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("resourceId"); + writer.WriteStringValue(ResourceId); + if (Optional.IsDefined(LoadTrustStore)) + { + writer.WritePropertyName("loadTrustStore"); + writer.WriteBooleanValue(LoadTrustStore.Value); + } + writer.WriteEndObject(); + } + + internal static LoadedCertificate DeserializeLoadedCertificate(JsonElement element) + { + ResourceIdentifier resourceId = default; + Optional loadTrustStore = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceId")) + { + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("loadTrustStore")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + loadTrustStore = property.Value.GetBoolean(); + continue; + } + } + return new LoadedCertificate(resourceId, Optional.ToNullable(loadTrustStore)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LoadedCertificate.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LoadedCertificate.cs new file mode 100644 index 0000000000000..a199aa738baf2 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LoadedCertificate.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Loaded certificate payload. + public partial class LoadedCertificate + { + /// Initializes a new instance of LoadedCertificate. + /// Resource Id of loaded certificate. + /// is null. + public LoadedCertificate(ResourceIdentifier resourceId) + { + if (resourceId == null) + { + throw new ArgumentNullException(nameof(resourceId)); + } + + ResourceId = resourceId; + } + + /// Initializes a new instance of LoadedCertificate. + /// Resource Id of loaded certificate. + /// Indicate whether the certificate will be loaded into default trust store, only work for Java runtime. + internal LoadedCertificate(ResourceIdentifier resourceId, bool? loadTrustStore) + { + ResourceId = resourceId; + LoadTrustStore = loadTrustStore; + } + + /// Resource Id of loaded certificate. + public ResourceIdentifier ResourceId { get; set; } + /// Indicate whether the certificate will be loaded into default trust store, only work for Java runtime. + public bool? LoadTrustStore { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUrlResponse.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUrlResponse.Serialization.cs new file mode 100644 index 0000000000000..24b2b29853ae9 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUrlResponse.Serialization.cs @@ -0,0 +1,30 @@ +// 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 LogFileUrlResponse + { + internal static LogFileUrlResponse DeserializeLogFileUrlResponse(JsonElement element) + { + Uri url = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("url")) + { + url = new Uri(property.Value.GetString()); + continue; + } + } + return new LogFileUrlResponse(url); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUrlResponse.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUrlResponse.cs new file mode 100644 index 0000000000000..1e4d783a7e682 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUrlResponse.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Log file URL payload. + public partial class LogFileUrlResponse + { + /// Initializes a new instance of LogFileUrlResponse. + /// URL of the log file. + /// is null. + internal LogFileUrlResponse(Uri uri) + { + if (uri == null) + { + throw new ArgumentNullException(nameof(uri)); + } + + Uri = uri; + } + + /// URL of the log file. + public Uri Uri { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MonitoringSettingProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MonitoringSettingProperties.Serialization.cs new file mode 100644 index 0000000000000..7ca388a924b3c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MonitoringSettingProperties.Serialization.cs @@ -0,0 +1,115 @@ +// 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 MonitoringSettingProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"); + writer.WriteObjectValue(Error); + } + if (Optional.IsDefined(TraceEnabled)) + { + writer.WritePropertyName("traceEnabled"); + writer.WriteBooleanValue(TraceEnabled.Value); + } + if (Optional.IsDefined(AppInsightsInstrumentationKey)) + { + writer.WritePropertyName("appInsightsInstrumentationKey"); + writer.WriteStringValue(AppInsightsInstrumentationKey); + } + if (Optional.IsDefined(AppInsightsSamplingRate)) + { + writer.WritePropertyName("appInsightsSamplingRate"); + writer.WriteNumberValue(AppInsightsSamplingRate.Value); + } + if (Optional.IsDefined(AppInsightsAgentVersions)) + { + writer.WritePropertyName("appInsightsAgentVersions"); + writer.WriteObjectValue(AppInsightsAgentVersions); + } + writer.WriteEndObject(); + } + + internal static MonitoringSettingProperties DeserializeMonitoringSettingProperties(JsonElement element) + { + Optional provisioningState = default; + Optional error = default; + Optional traceEnabled = default; + Optional appInsightsInstrumentationKey = default; + Optional appInsightsSamplingRate = default; + Optional appInsightsAgentVersions = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new MonitoringSettingState(property.Value.GetString()); + continue; + } + if (property.NameEquals("error")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + error = Error.DeserializeError(property.Value); + continue; + } + if (property.NameEquals("traceEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + traceEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("appInsightsInstrumentationKey")) + { + appInsightsInstrumentationKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("appInsightsSamplingRate")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + appInsightsSamplingRate = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("appInsightsAgentVersions")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + appInsightsAgentVersions = ApplicationInsightsAgentVersions.DeserializeApplicationInsightsAgentVersions(property.Value); + continue; + } + } + return new MonitoringSettingProperties(Optional.ToNullable(provisioningState), error.Value, Optional.ToNullable(traceEnabled), appInsightsInstrumentationKey.Value, Optional.ToNullable(appInsightsSamplingRate), appInsightsAgentVersions.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MonitoringSettingProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MonitoringSettingProperties.cs new file mode 100644 index 0000000000000..d8c9b9e832d93 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MonitoringSettingProperties.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Monitoring Setting properties payload. + public partial class MonitoringSettingProperties + { + /// Initializes a new instance of MonitoringSettingProperties. + public MonitoringSettingProperties() + { + } + + /// Initializes a new instance of MonitoringSettingProperties. + /// State of the Monitoring Setting. + /// Error when apply Monitoring Setting changes. + /// Indicates whether enable the trace functionality, which will be deprecated since api version 2020-11-01-preview. Please leverage appInsightsInstrumentationKey to indicate if monitoringSettings enabled or not. + /// Target application insight instrumentation key, null or whitespace include empty will disable monitoringSettings. + /// Indicates the sampling rate of application insight agent, should be in range [0.0, 100.0]. + /// Indicates the versions of application insight agent. + internal MonitoringSettingProperties(MonitoringSettingState? provisioningState, Error error, bool? traceEnabled, string appInsightsInstrumentationKey, double? appInsightsSamplingRate, ApplicationInsightsAgentVersions appInsightsAgentVersions) + { + ProvisioningState = provisioningState; + Error = error; + TraceEnabled = traceEnabled; + AppInsightsInstrumentationKey = appInsightsInstrumentationKey; + AppInsightsSamplingRate = appInsightsSamplingRate; + AppInsightsAgentVersions = appInsightsAgentVersions; + } + + /// State of the Monitoring Setting. + public MonitoringSettingState? ProvisioningState { get; } + /// Error when apply Monitoring Setting changes. + public Error Error { get; set; } + /// Indicates whether enable the trace functionality, which will be deprecated since api version 2020-11-01-preview. Please leverage appInsightsInstrumentationKey to indicate if monitoringSettings enabled or not. + public bool? TraceEnabled { get; set; } + /// Target application insight instrumentation key, null or whitespace include empty will disable monitoringSettings. + public string AppInsightsInstrumentationKey { get; set; } + /// Indicates the sampling rate of application insight agent, should be in range [0.0, 100.0]. + public double? AppInsightsSamplingRate { get; set; } + /// Indicates the versions of application insight agent. + internal ApplicationInsightsAgentVersions AppInsightsAgentVersions { get; set; } + /// Indicates the version of application insight java agent. + public string AppInsightsAgentVersionsJava + { + get => AppInsightsAgentVersions is null ? default : AppInsightsAgentVersions.Java; + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MonitoringSettingResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MonitoringSettingResourceData.Serialization.cs new file mode 100644 index 0000000000000..52ad681c2916c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MonitoringSettingResourceData.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; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + public partial class MonitoringSettingResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + + internal static MonitoringSettingResourceData DeserializeMonitoringSettingResourceData(JsonElement element) + { + Optional properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = MonitoringSettingProperties.DeserializeMonitoringSettingProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new MonitoringSettingResourceData(id, name, type, systemData, properties.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MonitoringSettingState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MonitoringSettingState.cs new file mode 100644 index 0000000000000..2d88c4ff2e65c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MonitoringSettingState.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 +{ + /// State of the Monitoring Setting. + public readonly partial struct MonitoringSettingState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MonitoringSettingState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotAvailableValue = "NotAvailable"; + private const string FailedValue = "Failed"; + private const string SucceededValue = "Succeeded"; + private const string UpdatingValue = "Updating"; + + /// NotAvailable. + public static MonitoringSettingState NotAvailable { get; } = new MonitoringSettingState(NotAvailableValue); + /// Failed. + public static MonitoringSettingState Failed { get; } = new MonitoringSettingState(FailedValue); + /// Succeeded. + public static MonitoringSettingState Succeeded { get; } = new MonitoringSettingState(SucceededValue); + /// Updating. + public static MonitoringSettingState Updating { get; } = new MonitoringSettingState(UpdatingValue); + /// Determines if two values are the same. + public static bool operator ==(MonitoringSettingState left, MonitoringSettingState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MonitoringSettingState left, MonitoringSettingState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MonitoringSettingState(string value) => new MonitoringSettingState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MonitoringSettingState other && Equals(other); + /// + public bool Equals(MonitoringSettingState 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/NameAvailability.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailability.Serialization.cs new file mode 100644 index 0000000000000..048944055dac0 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailability.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class NameAvailability + { + internal static NameAvailability DeserializeNameAvailability(JsonElement element) + { + Optional nameAvailable = default; + Optional reason = default; + Optional message = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nameAvailable")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + nameAvailable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("reason")) + { + reason = property.Value.GetString(); + continue; + } + if (property.NameEquals("message")) + { + message = property.Value.GetString(); + continue; + } + } + return new NameAvailability(Optional.ToNullable(nameAvailable), reason.Value, message.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailability.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailability.cs new file mode 100644 index 0000000000000..5fb7f8ee3848e --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailability.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Name availability result payload. + public partial class NameAvailability + { + /// Initializes a new instance of NameAvailability. + internal NameAvailability() + { + } + + /// Initializes a new instance of NameAvailability. + /// Indicates whether the name is available. + /// Reason why the name is not available. + /// Message why the name is not available. + internal NameAvailability(bool? nameAvailable, string reason, string message) + { + NameAvailable = nameAvailable; + Reason = reason; + Message = message; + } + + /// Indicates whether the name is available. + public bool? NameAvailable { get; } + /// Reason why the name is not available. + public string Reason { get; } + /// Message why the name is not available. + public string Message { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailabilityContent.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailabilityContent.Serialization.cs new file mode 100644 index 0000000000000..b2fc260fa6ecc --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailabilityContent.Serialization.cs @@ -0,0 +1,25 @@ +// 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 NameAvailabilityContent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(ResourceType); + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailabilityContent.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailabilityContent.cs new file mode 100644 index 0000000000000..40907e227c081 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailabilityContent.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Name availability parameters payload. + public partial class NameAvailabilityContent + { + /// Initializes a new instance of NameAvailabilityContent. + /// Type of the resource to check name availability. + /// Name to be checked. + /// or is null. + public NameAvailabilityContent(string resourceType, string name) + { + if (resourceType == null) + { + throw new ArgumentNullException(nameof(resourceType)); + } + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + + ResourceType = resourceType; + Name = name; + } + + /// Type of the resource to check name availability. + public string ResourceType { get; } + /// Name to be checked. + public string Name { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NetCoreZipUploadedUserSourceInfo.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NetCoreZipUploadedUserSourceInfo.Serialization.cs new file mode 100644 index 0000000000000..aa9fe72de046b --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NetCoreZipUploadedUserSourceInfo.Serialization.cs @@ -0,0 +1,81 @@ +// 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 NetCoreZipUploadedUserSourceInfo : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(NetCoreMainEntryPath)) + { + writer.WritePropertyName("netCoreMainEntryPath"); + writer.WriteStringValue(NetCoreMainEntryPath); + } + if (Optional.IsDefined(RuntimeVersion)) + { + writer.WritePropertyName("runtimeVersion"); + writer.WriteStringValue(RuntimeVersion); + } + if (Optional.IsDefined(RelativePath)) + { + writer.WritePropertyName("relativePath"); + writer.WriteStringValue(RelativePath); + } + writer.WritePropertyName("type"); + writer.WriteStringValue(UserSourceInfoType); + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(Version); + } + writer.WriteEndObject(); + } + + internal static NetCoreZipUploadedUserSourceInfo DeserializeNetCoreZipUploadedUserSourceInfo(JsonElement element) + { + Optional netCoreMainEntryPath = default; + Optional runtimeVersion = default; + Optional relativePath = default; + string type = default; + Optional version = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("netCoreMainEntryPath")) + { + netCoreMainEntryPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("runtimeVersion")) + { + runtimeVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("relativePath")) + { + relativePath = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("version")) + { + version = property.Value.GetString(); + continue; + } + } + return new NetCoreZipUploadedUserSourceInfo(type, version.Value, relativePath.Value, netCoreMainEntryPath.Value, runtimeVersion.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NetCoreZipUploadedUserSourceInfo.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NetCoreZipUploadedUserSourceInfo.cs new file mode 100644 index 0000000000000..1fddf363f9097 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NetCoreZipUploadedUserSourceInfo.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Uploaded Jar binary for a deployment. + public partial class NetCoreZipUploadedUserSourceInfo : UploadedUserSourceInfo + { + /// Initializes a new instance of NetCoreZipUploadedUserSourceInfo. + public NetCoreZipUploadedUserSourceInfo() + { + UserSourceInfoType = "NetCoreZip"; + } + + /// Initializes a new instance of NetCoreZipUploadedUserSourceInfo. + /// Type of the source uploaded. + /// Version of the source. + /// Relative path of the storage which stores the source. + /// The path to the .NET executable relative to zip root. + /// Runtime version of the .Net file. + internal NetCoreZipUploadedUserSourceInfo(string userSourceInfoType, string version, string relativePath, string netCoreMainEntryPath, string runtimeVersion) : base(userSourceInfoType, version, relativePath) + { + NetCoreMainEntryPath = netCoreMainEntryPath; + RuntimeVersion = runtimeVersion; + UserSourceInfoType = userSourceInfoType ?? "NetCoreZip"; + } + + /// The path to the .NET executable relative to zip root. + public string NetCoreMainEntryPath { get; set; } + /// Runtime version of the .Net file. + public string RuntimeVersion { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NetworkProfile.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NetworkProfile.Serialization.cs new file mode 100644 index 0000000000000..c2c503e6be43b --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NetworkProfile.Serialization.cs @@ -0,0 +1,122 @@ +// 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 NetworkProfile : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ServiceRuntimeSubnetId)) + { + writer.WritePropertyName("serviceRuntimeSubnetId"); + writer.WriteStringValue(ServiceRuntimeSubnetId); + } + if (Optional.IsDefined(AppSubnetId)) + { + writer.WritePropertyName("appSubnetId"); + writer.WriteStringValue(AppSubnetId); + } + if (Optional.IsDefined(ServiceCidr)) + { + writer.WritePropertyName("serviceCidr"); + writer.WriteStringValue(ServiceCidr); + } + if (Optional.IsDefined(ServiceRuntimeNetworkResourceGroup)) + { + writer.WritePropertyName("serviceRuntimeNetworkResourceGroup"); + writer.WriteStringValue(ServiceRuntimeNetworkResourceGroup); + } + if (Optional.IsDefined(AppNetworkResourceGroup)) + { + writer.WritePropertyName("appNetworkResourceGroup"); + writer.WriteStringValue(AppNetworkResourceGroup); + } + writer.WriteEndObject(); + } + + internal static NetworkProfile DeserializeNetworkProfile(JsonElement element) + { + Optional serviceRuntimeSubnetId = default; + Optional appSubnetId = default; + Optional serviceCidr = default; + Optional serviceRuntimeNetworkResourceGroup = default; + Optional appNetworkResourceGroup = default; + Optional outboundIPs = default; + Optional> requiredTraffics = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("serviceRuntimeSubnetId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + serviceRuntimeSubnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("appSubnetId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + appSubnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("serviceCidr")) + { + serviceCidr = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceRuntimeNetworkResourceGroup")) + { + serviceRuntimeNetworkResourceGroup = property.Value.GetString(); + continue; + } + if (property.NameEquals("appNetworkResourceGroup")) + { + appNetworkResourceGroup = property.Value.GetString(); + continue; + } + if (property.NameEquals("outboundIPs")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + outboundIPs = NetworkProfileOutboundIPs.DeserializeNetworkProfileOutboundIPs(property.Value); + continue; + } + if (property.NameEquals("requiredTraffics")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(RequiredTraffic.DeserializeRequiredTraffic(item)); + } + requiredTraffics = array; + continue; + } + } + return new NetworkProfile(serviceRuntimeSubnetId.Value, appSubnetId.Value, serviceCidr.Value, serviceRuntimeNetworkResourceGroup.Value, appNetworkResourceGroup.Value, outboundIPs.Value, Optional.ToList(requiredTraffics)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NetworkProfile.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NetworkProfile.cs new file mode 100644 index 0000000000000..927a5d1df7b43 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NetworkProfile.cs @@ -0,0 +1,62 @@ +// 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 +{ + /// Service network profile payload. + public partial class NetworkProfile + { + /// Initializes a new instance of NetworkProfile. + public NetworkProfile() + { + RequiredTraffics = new ChangeTrackingList(); + } + + /// Initializes a new instance of NetworkProfile. + /// Fully qualified resource Id of the subnet to host Azure Spring Cloud Service Runtime. + /// Fully qualified resource Id of the subnet to host Azure Spring Cloud Apps. + /// Azure Spring Cloud service reserved CIDR. + /// Name of the resource group containing network resources of Azure Spring Cloud Service Runtime. + /// Name of the resource group containing network resources of Azure Spring Cloud Apps. + /// Desired outbound IP resources for Azure Spring Cloud instance. + /// Required inbound or outbound traffics for Azure Spring Cloud instance. + internal NetworkProfile(ResourceIdentifier serviceRuntimeSubnetId, ResourceIdentifier appSubnetId, string serviceCidr, string serviceRuntimeNetworkResourceGroup, string appNetworkResourceGroup, NetworkProfileOutboundIPs outboundIPs, IReadOnlyList requiredTraffics) + { + ServiceRuntimeSubnetId = serviceRuntimeSubnetId; + AppSubnetId = appSubnetId; + ServiceCidr = serviceCidr; + ServiceRuntimeNetworkResourceGroup = serviceRuntimeNetworkResourceGroup; + AppNetworkResourceGroup = appNetworkResourceGroup; + OutboundIPs = outboundIPs; + RequiredTraffics = requiredTraffics; + } + + /// Fully qualified resource Id of the subnet to host Azure Spring Cloud Service Runtime. + public ResourceIdentifier ServiceRuntimeSubnetId { get; set; } + /// Fully qualified resource Id of the subnet to host Azure Spring Cloud Apps. + public ResourceIdentifier AppSubnetId { get; set; } + /// Azure Spring Cloud service reserved CIDR. + public string ServiceCidr { get; set; } + /// Name of the resource group containing network resources of Azure Spring Cloud Service Runtime. + public string ServiceRuntimeNetworkResourceGroup { get; set; } + /// Name of the resource group containing network resources of Azure Spring Cloud Apps. + public string AppNetworkResourceGroup { get; set; } + /// Desired outbound IP resources for Azure Spring Cloud instance. + internal NetworkProfileOutboundIPs OutboundIPs { get; } + /// A list of public IP addresses. + public IReadOnlyList OutboundPublicIPs + { + get => OutboundIPs?.PublicIPs; + } + + /// Required inbound or outbound traffics for Azure Spring Cloud instance. + public IReadOnlyList RequiredTraffics { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NetworkProfileOutboundIPs.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NetworkProfileOutboundIPs.Serialization.cs new file mode 100644 index 0000000000000..54fb1b65b60ff --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NetworkProfileOutboundIPs.Serialization.cs @@ -0,0 +1,40 @@ +// 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 +{ + internal partial class NetworkProfileOutboundIPs + { + internal static NetworkProfileOutboundIPs DeserializeNetworkProfileOutboundIPs(JsonElement element) + { + Optional> publicIPs = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("publicIPs")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + publicIPs = array; + continue; + } + } + return new NetworkProfileOutboundIPs(Optional.ToList(publicIPs)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NetworkProfileOutboundIPs.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NetworkProfileOutboundIPs.cs new file mode 100644 index 0000000000000..f533a5995315f --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NetworkProfileOutboundIPs.cs @@ -0,0 +1,32 @@ +// 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 +{ + /// Desired outbound IP resources for Azure Spring Cloud instance. + internal partial class NetworkProfileOutboundIPs + { + /// Initializes a new instance of NetworkProfileOutboundIPs. + internal NetworkProfileOutboundIPs() + { + PublicIPs = new ChangeTrackingList(); + } + + /// Initializes a new instance of NetworkProfileOutboundIPs. + /// A list of public IP addresses. + internal NetworkProfileOutboundIPs(IReadOnlyList publicIPs) + { + PublicIPs = publicIPs; + } + + /// A list of public IP addresses. + public IReadOnlyList PublicIPs { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PersistentDisk.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PersistentDisk.Serialization.cs new file mode 100644 index 0000000000000..e184a632d83bb --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PersistentDisk.Serialization.cs @@ -0,0 +1,67 @@ +// 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 PersistentDisk : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SizeInGB)) + { + writer.WritePropertyName("sizeInGB"); + writer.WriteNumberValue(SizeInGB.Value); + } + if (Optional.IsDefined(MountPath)) + { + writer.WritePropertyName("mountPath"); + writer.WriteStringValue(MountPath); + } + writer.WriteEndObject(); + } + + internal static PersistentDisk DeserializePersistentDisk(JsonElement element) + { + Optional sizeInGB = default; + Optional usedInGB = default; + Optional mountPath = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sizeInGB")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sizeInGB = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("usedInGB")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + usedInGB = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("mountPath")) + { + mountPath = property.Value.GetString(); + continue; + } + } + return new PersistentDisk(Optional.ToNullable(sizeInGB), Optional.ToNullable(usedInGB), mountPath.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PersistentDisk.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PersistentDisk.cs new file mode 100644 index 0000000000000..0bb53ba501209 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PersistentDisk.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Persistent disk payload. + public partial class PersistentDisk + { + /// Initializes a new instance of PersistentDisk. + public PersistentDisk() + { + } + + /// Initializes a new instance of PersistentDisk. + /// Size of the persistent disk in GB. + /// Size of the used persistent disk in GB. + /// Mount path of the persistent disk. + internal PersistentDisk(int? sizeInGB, int? usedInGB, string mountPath) + { + SizeInGB = sizeInGB; + UsedInGB = usedInGB; + MountPath = mountPath; + } + + /// Size of the persistent disk in GB. + public int? SizeInGB { get; set; } + /// Size of the used persistent disk in GB. + public int? UsedInGB { get; } + /// Mount path of the persistent disk. + public string MountPath { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PowerState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PowerState.cs new file mode 100644 index 0000000000000..497156e21ecd7 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/PowerState.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 +{ + /// Power state of the Service. + public readonly partial struct PowerState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PowerState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RunningValue = "Running"; + private const string StoppedValue = "Stopped"; + + /// Running. + public static PowerState Running { get; } = new PowerState(RunningValue); + /// Stopped. + public static PowerState Stopped { get; } = new PowerState(StoppedValue); + /// Determines if two values are the same. + public static bool operator ==(PowerState left, PowerState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PowerState left, PowerState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PowerState(string value) => new PowerState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PowerState other && Equals(other); + /// + public bool Equals(PowerState 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/ProvisioningState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ProvisioningState.cs new file mode 100644 index 0000000000000..c7819b07e2e40 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ProvisioningState.cs @@ -0,0 +1,78 @@ +// 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 Service. + public readonly partial struct ProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatingValue = "Creating"; + private const string UpdatingValue = "Updating"; + private const string StartingValue = "Starting"; + private const string StoppingValue = "Stopping"; + private const string DeletingValue = "Deleting"; + private const string DeletedValue = "Deleted"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string MovingValue = "Moving"; + private const string MovedValue = "Moved"; + private const string MoveFailedValue = "MoveFailed"; + + /// Creating. + public static ProvisioningState Creating { get; } = new ProvisioningState(CreatingValue); + /// Updating. + public static ProvisioningState Updating { get; } = new ProvisioningState(UpdatingValue); + /// Starting. + public static ProvisioningState Starting { get; } = new ProvisioningState(StartingValue); + /// Stopping. + public static ProvisioningState Stopping { get; } = new ProvisioningState(StoppingValue); + /// Deleting. + public static ProvisioningState Deleting { get; } = new ProvisioningState(DeletingValue); + /// Deleted. + public static ProvisioningState Deleted { get; } = new ProvisioningState(DeletedValue); + /// Succeeded. + public static ProvisioningState Succeeded { get; } = new ProvisioningState(SucceededValue); + /// Failed. + public static ProvisioningState Failed { get; } = new ProvisioningState(FailedValue); + /// Moving. + public static ProvisioningState Moving { get; } = new ProvisioningState(MovingValue); + /// Moved. + public static ProvisioningState Moved { get; } = new ProvisioningState(MovedValue); + /// MoveFailed. + public static ProvisioningState MoveFailed { get; } = new ProvisioningState(MoveFailedValue); + /// Determines if two values are the same. + public static bool operator ==(ProvisioningState left, ProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProvisioningState left, ProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ProvisioningState(string value) => new ProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProvisioningState other && Equals(other); + /// + public bool Equals(ProvisioningState 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/RegenerateTestKeyRequestPayload.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/RegenerateTestKeyRequestPayload.Serialization.cs new file mode 100644 index 0000000000000..9b244acfdeb85 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/RegenerateTestKeyRequestPayload.Serialization.cs @@ -0,0 +1,23 @@ +// 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 RegenerateTestKeyRequestPayload : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("keyType"); + writer.WriteStringValue(KeyType.ToString()); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/RegenerateTestKeyRequestPayload.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/RegenerateTestKeyRequestPayload.cs new file mode 100644 index 0000000000000..1f9a32ed68ac1 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/RegenerateTestKeyRequestPayload.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Regenerate test key request payload. + public partial class RegenerateTestKeyRequestPayload + { + /// Initializes a new instance of RegenerateTestKeyRequestPayload. + /// Type of the test key. + public RegenerateTestKeyRequestPayload(TestKeyType keyType) + { + KeyType = keyType; + } + + /// Type of the test key. + public TestKeyType KeyType { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/RequiredTraffic.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/RequiredTraffic.Serialization.cs new file mode 100644 index 0000000000000..81840c75f98b9 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/RequiredTraffic.Serialization.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class RequiredTraffic + { + internal static RequiredTraffic DeserializeRequiredTraffic(JsonElement element) + { + Optional protocol = default; + Optional port = default; + Optional> ips = default; + Optional> fqdns = default; + Optional direction = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("protocol")) + { + protocol = property.Value.GetString(); + continue; + } + if (property.NameEquals("port")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + port = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("ips")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + ips = array; + continue; + } + if (property.NameEquals("fqdns")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + fqdns = array; + continue; + } + if (property.NameEquals("direction")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + direction = new TrafficDirection(property.Value.GetString()); + continue; + } + } + return new RequiredTraffic(protocol.Value, Optional.ToNullable(port), Optional.ToList(ips), Optional.ToList(fqdns), Optional.ToNullable(direction)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/RequiredTraffic.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/RequiredTraffic.cs new file mode 100644 index 0000000000000..e4441de1f46e5 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/RequiredTraffic.cs @@ -0,0 +1,49 @@ +// 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 +{ + /// Required inbound or outbound traffic for Azure Spring Cloud instance. + public partial class RequiredTraffic + { + /// Initializes a new instance of RequiredTraffic. + internal RequiredTraffic() + { + IPs = new ChangeTrackingList(); + Fqdns = new ChangeTrackingList(); + } + + /// Initializes a new instance of RequiredTraffic. + /// The protocol of required traffic. + /// The port of required traffic. + /// The ip list of required traffic. + /// The FQDN list of required traffic. + /// The direction of required traffic. + internal RequiredTraffic(string protocol, int? port, IReadOnlyList iPs, IReadOnlyList fqdns, TrafficDirection? direction) + { + Protocol = protocol; + Port = port; + IPs = iPs; + Fqdns = fqdns; + Direction = direction; + } + + /// The protocol of required traffic. + public string Protocol { get; } + /// The port of required traffic. + public int? Port { get; } + /// The ip list of required traffic. + public IReadOnlyList IPs { get; } + /// The FQDN list of required traffic. + public IReadOnlyList Fqdns { get; } + /// The direction of required traffic. + public TrafficDirection? Direction { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceRequests.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceRequests.Serialization.cs new file mode 100644 index 0000000000000..b11f81d661803 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceRequests.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class ResourceRequests : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Cpu)) + { + writer.WritePropertyName("cpu"); + writer.WriteStringValue(Cpu); + } + if (Optional.IsDefined(Memory)) + { + writer.WritePropertyName("memory"); + writer.WriteStringValue(Memory); + } + writer.WriteEndObject(); + } + + internal static ResourceRequests DeserializeResourceRequests(JsonElement element) + { + Optional cpu = default; + Optional memory = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("cpu")) + { + cpu = property.Value.GetString(); + continue; + } + if (property.NameEquals("memory")) + { + memory = property.Value.GetString(); + continue; + } + } + return new ResourceRequests(cpu.Value, memory.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceRequests.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceRequests.cs new file mode 100644 index 0000000000000..7ec07ba8d5c7c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceRequests.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Deployment resource request payload. + public partial class ResourceRequests + { + /// Initializes a new instance of ResourceRequests. + public ResourceRequests() + { + } + + /// Initializes a new instance of ResourceRequests. + /// Required CPU. 1 core can be represented by 1 or 1000m. This should be 500m or 1 for Basic tier, and {500m, 1, 2, 3, 4} for Standard tier. + /// Required memory. 1 GB can be represented by 1Gi or 1024Mi. This should be {512Mi, 1Gi, 2Gi} for Basic tier, and {512Mi, 1Gi, 2Gi, ..., 8Gi} for Standard tier. + internal ResourceRequests(string cpu, string memory) + { + Cpu = cpu; + Memory = memory; + } + + /// Required CPU. 1 core can be represented by 1 or 1000m. This should be 500m or 1 for Basic tier, and {500m, 1, 2, 3, 4} for Standard tier. + public string Cpu { get; set; } + /// Required memory. 1 GB can be represented by 1Gi or 1024Mi. This should be {512Mi, 1Gi, 2Gi} for Basic tier, and {512Mi, 1Gi, 2Gi, ..., 8Gi} for Standard tier. + public string Memory { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSku.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSku.Serialization.cs new file mode 100644 index 0000000000000..7585f45c8efc7 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSku.Serialization.cs @@ -0,0 +1,101 @@ +// 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 ResourceSku + { + internal static ResourceSku DeserializeResourceSku(JsonElement element) + { + Optional resourceType = default; + Optional name = default; + Optional tier = default; + Optional capacity = default; + Optional> locations = default; + Optional> locationInfo = default; + Optional> restrictions = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceType")) + { + resourceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("tier")) + { + tier = property.Value.GetString(); + continue; + } + if (property.NameEquals("capacity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + capacity = SkuCapacity.DeserializeSkuCapacity(property.Value); + continue; + } + if (property.NameEquals("locations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + locations = array; + continue; + } + if (property.NameEquals("locationInfo")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceSkuLocationInfo.DeserializeResourceSkuLocationInfo(item)); + } + locationInfo = array; + continue; + } + if (property.NameEquals("restrictions")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceSkuRestrictions.DeserializeResourceSkuRestrictions(item)); + } + restrictions = array; + continue; + } + } + return new ResourceSku(resourceType.Value, name.Value, tier.Value, capacity.Value, Optional.ToList(locations), Optional.ToList(locationInfo), Optional.ToList(restrictions)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSku.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSku.cs new file mode 100644 index 0000000000000..5dba3bd9dd68a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSku.cs @@ -0,0 +1,64 @@ +// 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 +{ + /// Describes an available Azure Spring Cloud SKU. + public partial class ResourceSku + { + /// Initializes a new instance of ResourceSku. + internal ResourceSku() + { + Locations = new ChangeTrackingList(); + LocationInfo = new ChangeTrackingList(); + Restrictions = new ChangeTrackingList(); + } + + /// Initializes a new instance of ResourceSku. + /// Gets the type of resource the SKU applies to. + /// Gets the name of SKU. + /// Gets the tier of SKU. + /// Gets the capacity of SKU. + /// Gets the set of locations that the SKU is available. + /// Gets a list of locations and availability zones in those locations where the SKU is available. + /// + /// Gets the restrictions because of which SKU cannot be used. This is + /// empty if there are no restrictions. + /// + internal ResourceSku(string resourceType, string name, string tier, SkuCapacity capacity, IReadOnlyList locations, IReadOnlyList locationInfo, IReadOnlyList restrictions) + { + ResourceType = resourceType; + Name = name; + Tier = tier; + Capacity = capacity; + Locations = locations; + LocationInfo = locationInfo; + Restrictions = restrictions; + } + + /// Gets the type of resource the SKU applies to. + public string ResourceType { get; } + /// Gets the name of SKU. + public string Name { get; } + /// Gets the tier of SKU. + public string Tier { get; } + /// Gets the capacity of SKU. + public SkuCapacity Capacity { get; } + /// Gets the set of locations that the SKU is available. + public IReadOnlyList Locations { get; } + /// Gets a list of locations and availability zones in those locations where the SKU is available. + public IReadOnlyList LocationInfo { get; } + /// + /// Gets the restrictions because of which SKU cannot be used. This is + /// empty if there are no restrictions. + /// + public IReadOnlyList Restrictions { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuCapabilities.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuCapabilities.Serialization.cs new file mode 100644 index 0000000000000..bb50b542b2c09 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuCapabilities.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class ResourceSkuCapabilities + { + internal static ResourceSkuCapabilities DeserializeResourceSkuCapabilities(JsonElement element) + { + Optional name = default; + Optional value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("value")) + { + value = property.Value.GetString(); + continue; + } + } + return new ResourceSkuCapabilities(name.Value, value.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuCapabilities.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuCapabilities.cs new file mode 100644 index 0000000000000..fced7d44833d8 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuCapabilities.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 ResourceSkuCapabilities. + public partial class ResourceSkuCapabilities + { + /// Initializes a new instance of ResourceSkuCapabilities. + internal ResourceSkuCapabilities() + { + } + + /// Initializes a new instance of ResourceSkuCapabilities. + /// Gets an invariant to describe the feature. + /// Gets an invariant if the feature is measured by quantity. + internal ResourceSkuCapabilities(string name, string value) + { + Name = name; + Value = value; + } + + /// Gets an invariant to describe the feature. + public string Name { get; } + /// Gets an invariant if the feature is measured by quantity. + public string Value { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuCollection.Serialization.cs new file mode 100644 index 0000000000000..f6cb550801fa6 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuCollection.Serialization.cs @@ -0,0 +1,46 @@ +// 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 +{ + internal partial class ResourceSkuCollection + { + internal static ResourceSkuCollection DeserializeResourceSkuCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceSku.DeserializeResourceSku(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new ResourceSkuCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuCollection.cs new file mode 100644 index 0000000000000..5c847901b8671 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuCollection.cs @@ -0,0 +1,42 @@ +// 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 +{ + /// Object that includes an array of Azure Spring Cloud SKU and a possible link for next set. + internal partial class ResourceSkuCollection + { + /// Initializes a new instance of ResourceSkuCollection. + internal ResourceSkuCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of ResourceSkuCollection. + /// Collection of resource SKU. + /// + /// URL client should use to fetch the next page (per server side paging). + /// It's null for now, added for future use. + /// + internal ResourceSkuCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of resource SKU. + 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/ResourceSkuLocationInfo.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuLocationInfo.Serialization.cs new file mode 100644 index 0000000000000..71eaca23735e9 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuLocationInfo.Serialization.cs @@ -0,0 +1,67 @@ +// 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 ResourceSkuLocationInfo + { + internal static ResourceSkuLocationInfo DeserializeResourceSkuLocationInfo(JsonElement element) + { + Optional location = default; + Optional> zones = default; + Optional> zoneDetails = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("location")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("zones")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + zones = array; + continue; + } + if (property.NameEquals("zoneDetails")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceSkuZoneDetails.DeserializeResourceSkuZoneDetails(item)); + } + zoneDetails = array; + continue; + } + } + return new ResourceSkuLocationInfo(Optional.ToNullable(location), Optional.ToList(zones), Optional.ToList(zoneDetails)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuLocationInfo.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuLocationInfo.cs new file mode 100644 index 0000000000000..428c565968c6e --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuLocationInfo.cs @@ -0,0 +1,41 @@ +// 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 +{ + /// Locations and availability zones where the SKU is available. + public partial class ResourceSkuLocationInfo + { + /// Initializes a new instance of ResourceSkuLocationInfo. + internal ResourceSkuLocationInfo() + { + Zones = new ChangeTrackingList(); + ZoneDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of ResourceSkuLocationInfo. + /// Gets location of the SKU. + /// Gets list of availability zones where the SKU is supported. + /// Gets details of capabilities available to a SKU in specific zones. + internal ResourceSkuLocationInfo(AzureLocation? location, IReadOnlyList zones, IReadOnlyList zoneDetails) + { + Location = location; + Zones = zones; + ZoneDetails = zoneDetails; + } + + /// Gets location of the SKU. + public AzureLocation? Location { get; } + /// Gets list of availability zones where the SKU is supported. + public IReadOnlyList Zones { get; } + /// Gets details of capabilities available to a SKU in specific zones. + public IReadOnlyList ZoneDetails { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictionInfo.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictionInfo.Serialization.cs new file mode 100644 index 0000000000000..08a182577509d --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictionInfo.Serialization.cs @@ -0,0 +1,56 @@ +// 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 ResourceSkuRestrictionInfo + { + internal static ResourceSkuRestrictionInfo DeserializeResourceSkuRestrictionInfo(JsonElement element) + { + Optional> locations = default; + Optional> zones = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("locations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + locations = array; + continue; + } + if (property.NameEquals("zones")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + zones = array; + continue; + } + } + return new ResourceSkuRestrictionInfo(Optional.ToList(locations), Optional.ToList(zones)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictionInfo.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictionInfo.cs new file mode 100644 index 0000000000000..aa6712981c160 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictionInfo.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 +{ + /// Information about the restriction where the SKU cannot be used. + public partial class ResourceSkuRestrictionInfo + { + /// Initializes a new instance of ResourceSkuRestrictionInfo. + internal ResourceSkuRestrictionInfo() + { + Locations = new ChangeTrackingList(); + Zones = new ChangeTrackingList(); + } + + /// Initializes a new instance of ResourceSkuRestrictionInfo. + /// Gets locations where the SKU is restricted. + /// Gets list of availability zones where the SKU is restricted. + internal ResourceSkuRestrictionInfo(IReadOnlyList locations, IReadOnlyList zones) + { + Locations = locations; + Zones = zones; + } + + /// Gets locations where the SKU is restricted. + public IReadOnlyList Locations { get; } + /// Gets list of availability zones where the SKU is restricted. + public IReadOnlyList Zones { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictions.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictions.Serialization.cs new file mode 100644 index 0000000000000..2a048d02afc9a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictions.Serialization.cs @@ -0,0 +1,73 @@ +// 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 ResourceSkuRestrictions + { + internal static ResourceSkuRestrictions DeserializeResourceSkuRestrictions(JsonElement element) + { + Optional type = default; + Optional> values = default; + Optional restrictionInfo = default; + Optional reasonCode = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + type = new ResourceSkuRestrictionsType(property.Value.GetString()); + continue; + } + if (property.NameEquals("values")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + values = array; + continue; + } + if (property.NameEquals("restrictionInfo")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + restrictionInfo = ResourceSkuRestrictionInfo.DeserializeResourceSkuRestrictionInfo(property.Value); + continue; + } + if (property.NameEquals("reasonCode")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + reasonCode = new ResourceSkuRestrictionsReasonCode(property.Value.GetString()); + continue; + } + } + return new ResourceSkuRestrictions(Optional.ToNullable(type), Optional.ToList(values), restrictionInfo.Value, Optional.ToNullable(reasonCode)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictions.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictions.cs new file mode 100644 index 0000000000000..88c53538bf70f --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictions.cs @@ -0,0 +1,50 @@ +// 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 +{ + /// Restrictions where the SKU cannot be used. + public partial class ResourceSkuRestrictions + { + /// Initializes a new instance of ResourceSkuRestrictions. + internal ResourceSkuRestrictions() + { + Values = new ChangeTrackingList(); + } + + /// Initializes a new instance of ResourceSkuRestrictions. + /// Gets the type of restrictions. Possible values include: 'Location', 'Zone'. + /// + /// Gets the value of restrictions. If the restriction type is set to + /// location. This would be different locations where the SKU is restricted. + /// + /// Gets the information about the restriction where the SKU cannot be used. + /// Gets the reason for restriction. Possible values include: 'QuotaId', 'NotAvailableForSubscription'. + internal ResourceSkuRestrictions(ResourceSkuRestrictionsType? restrictionsType, IReadOnlyList values, ResourceSkuRestrictionInfo restrictionInfo, ResourceSkuRestrictionsReasonCode? reasonCode) + { + RestrictionsType = restrictionsType; + Values = values; + RestrictionInfo = restrictionInfo; + ReasonCode = reasonCode; + } + + /// Gets the type of restrictions. Possible values include: 'Location', 'Zone'. + public ResourceSkuRestrictionsType? RestrictionsType { get; } + /// + /// Gets the value of restrictions. If the restriction type is set to + /// location. This would be different locations where the SKU is restricted. + /// + public IReadOnlyList Values { get; } + /// Gets the information about the restriction where the SKU cannot be used. + public ResourceSkuRestrictionInfo RestrictionInfo { get; } + /// Gets the reason for restriction. Possible values include: 'QuotaId', 'NotAvailableForSubscription'. + public ResourceSkuRestrictionsReasonCode? ReasonCode { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictionsReasonCode.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictionsReasonCode.cs new file mode 100644 index 0000000000000..238bce9699c1d --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictionsReasonCode.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 +{ + /// Gets the reason for restriction. Possible values include: 'QuotaId', 'NotAvailableForSubscription'. + public readonly partial struct ResourceSkuRestrictionsReasonCode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ResourceSkuRestrictionsReasonCode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string QuotaIdValue = "QuotaId"; + private const string NotAvailableForSubscriptionValue = "NotAvailableForSubscription"; + + /// QuotaId. + public static ResourceSkuRestrictionsReasonCode QuotaId { get; } = new ResourceSkuRestrictionsReasonCode(QuotaIdValue); + /// NotAvailableForSubscription. + public static ResourceSkuRestrictionsReasonCode NotAvailableForSubscription { get; } = new ResourceSkuRestrictionsReasonCode(NotAvailableForSubscriptionValue); + /// Determines if two values are the same. + public static bool operator ==(ResourceSkuRestrictionsReasonCode left, ResourceSkuRestrictionsReasonCode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ResourceSkuRestrictionsReasonCode left, ResourceSkuRestrictionsReasonCode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ResourceSkuRestrictionsReasonCode(string value) => new ResourceSkuRestrictionsReasonCode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ResourceSkuRestrictionsReasonCode other && Equals(other); + /// + public bool Equals(ResourceSkuRestrictionsReasonCode 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/ResourceSkuRestrictionsType.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictionsType.cs new file mode 100644 index 0000000000000..41f006deec7ea --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictionsType.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 +{ + /// Gets the type of restrictions. Possible values include: 'Location', 'Zone'. + public readonly partial struct ResourceSkuRestrictionsType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ResourceSkuRestrictionsType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LocationValue = "Location"; + private const string ZoneValue = "Zone"; + + /// Location. + public static ResourceSkuRestrictionsType Location { get; } = new ResourceSkuRestrictionsType(LocationValue); + /// Zone. + public static ResourceSkuRestrictionsType Zone { get; } = new ResourceSkuRestrictionsType(ZoneValue); + /// Determines if two values are the same. + public static bool operator ==(ResourceSkuRestrictionsType left, ResourceSkuRestrictionsType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ResourceSkuRestrictionsType left, ResourceSkuRestrictionsType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ResourceSkuRestrictionsType(string value) => new ResourceSkuRestrictionsType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ResourceSkuRestrictionsType other && Equals(other); + /// + public bool Equals(ResourceSkuRestrictionsType 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/ResourceSkuZoneDetails.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuZoneDetails.Serialization.cs new file mode 100644 index 0000000000000..16cdeb333e06b --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuZoneDetails.Serialization.cs @@ -0,0 +1,56 @@ +// 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 ResourceSkuZoneDetails + { + internal static ResourceSkuZoneDetails DeserializeResourceSkuZoneDetails(JsonElement element) + { + Optional> name = default; + Optional> capabilities = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + name = array; + continue; + } + if (property.NameEquals("capabilities")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceSkuCapabilities.DeserializeResourceSkuCapabilities(item)); + } + capabilities = array; + continue; + } + } + return new ResourceSkuZoneDetails(Optional.ToList(name), Optional.ToList(capabilities)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuZoneDetails.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuZoneDetails.cs new file mode 100644 index 0000000000000..2deb36dd1c6a2 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuZoneDetails.cs @@ -0,0 +1,49 @@ +// 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 +{ + /// Details of capabilities available to a SKU in specific zones. + public partial class ResourceSkuZoneDetails + { + /// Initializes a new instance of ResourceSkuZoneDetails. + internal ResourceSkuZoneDetails() + { + Name = new ChangeTrackingList(); + Capabilities = new ChangeTrackingList(); + } + + /// Initializes a new instance of ResourceSkuZoneDetails. + /// + /// Gets the set of zones that the SKU is available in with the + /// specified capabilities. + /// + /// + /// Gets a list of capabilities that are available for the SKU in the + /// specified list of zones. + /// + internal ResourceSkuZoneDetails(IReadOnlyList name, IReadOnlyList capabilities) + { + Name = name; + Capabilities = capabilities; + } + + /// + /// Gets the set of zones that the SKU is available in with the + /// specified capabilities. + /// + public IReadOnlyList Name { get; } + /// + /// Gets a list of capabilities that are available for the SKU in the + /// specified list of zones. + /// + public IReadOnlyList Capabilities { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceUploadDefinition.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceUploadDefinition.Serialization.cs new file mode 100644 index 0000000000000..4ba43a3934891 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceUploadDefinition.Serialization.cs @@ -0,0 +1,41 @@ +// 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 ResourceUploadDefinition + { + internal static ResourceUploadDefinition DeserializeResourceUploadDefinition(JsonElement element) + { + Optional relativePath = default; + Optional uploadUrl = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("relativePath")) + { + relativePath = property.Value.GetString(); + continue; + } + if (property.NameEquals("uploadUrl")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + uploadUrl = null; + continue; + } + uploadUrl = new Uri(property.Value.GetString()); + continue; + } + } + return new ResourceUploadDefinition(relativePath.Value, uploadUrl.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceUploadDefinition.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceUploadDefinition.cs new file mode 100644 index 0000000000000..25739d6c3ada7 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceUploadDefinition.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Resource upload definition payload. + public partial class ResourceUploadDefinition + { + /// Initializes a new instance of ResourceUploadDefinition. + internal ResourceUploadDefinition() + { + } + + /// Initializes a new instance of ResourceUploadDefinition. + /// Source relative path. + /// Upload URL. + internal ResourceUploadDefinition(string relativePath, Uri uploadUri) + { + RelativePath = relativePath; + UploadUri = uploadUri; + } + + /// Source relative path. + public string RelativePath { get; } + /// Upload URL. + public Uri UploadUri { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryInstance.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryInstance.Serialization.cs new file mode 100644 index 0000000000000..e905d76483bf8 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryInstance.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class ServiceRegistryInstance + { + internal static ServiceRegistryInstance DeserializeServiceRegistryInstance(JsonElement element) + { + Optional name = default; + Optional status = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("status")) + { + status = property.Value.GetString(); + continue; + } + } + return new ServiceRegistryInstance(name.Value, status.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryInstance.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryInstance.cs new file mode 100644 index 0000000000000..a47123695de21 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryInstance.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 Service Registry. + public partial class ServiceRegistryInstance + { + /// Initializes a new instance of ServiceRegistryInstance. + internal ServiceRegistryInstance() + { + } + + /// Initializes a new instance of ServiceRegistryInstance. + /// Name of the Service Registry instance. + /// Status of the Service Registry instance. + internal ServiceRegistryInstance(string name, string status) + { + Name = name; + Status = status; + } + + /// Name of the Service Registry instance. + public string Name { get; } + /// Status of the Service Registry instance. + public string Status { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryProperties.Serialization.cs new file mode 100644 index 0000000000000..a4942d6bef7bd --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryProperties.Serialization.cs @@ -0,0 +1,68 @@ +// 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 ServiceRegistryProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WriteEndObject(); + } + + internal static ServiceRegistryProperties DeserializeServiceRegistryProperties(JsonElement element) + { + Optional provisioningState = default; + Optional resourceRequests = default; + Optional> instances = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new ServiceRegistryProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("resourceRequests")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + resourceRequests = ServiceRegistryResourceRequests.DeserializeServiceRegistryResourceRequests(property.Value); + continue; + } + if (property.NameEquals("instances")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ServiceRegistryInstance.DeserializeServiceRegistryInstance(item)); + } + instances = array; + continue; + } + } + return new ServiceRegistryProperties(Optional.ToNullable(provisioningState), resourceRequests.Value, Optional.ToList(instances)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryProperties.cs new file mode 100644 index 0000000000000..b438db9a97656 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryProperties.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 +{ + /// Service Registry properties payload. + public partial class ServiceRegistryProperties + { + /// Initializes a new instance of ServiceRegistryProperties. + public ServiceRegistryProperties() + { + Instances = new ChangeTrackingList(); + } + + /// Initializes a new instance of ServiceRegistryProperties. + /// State of the Service Registry. + /// The requested resource quantity for required CPU and Memory. + /// Collection of instances belong to Service Registry. + internal ServiceRegistryProperties(ServiceRegistryProvisioningState? provisioningState, ServiceRegistryResourceRequests resourceRequests, IReadOnlyList instances) + { + ProvisioningState = provisioningState; + ResourceRequests = resourceRequests; + Instances = instances; + } + + /// State of the Service Registry. + public ServiceRegistryProvisioningState? ProvisioningState { get; } + /// The requested resource quantity for required CPU and Memory. + public ServiceRegistryResourceRequests ResourceRequests { get; } + /// Collection of instances belong to Service Registry. + public IReadOnlyList Instances { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryProvisioningState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryProvisioningState.cs new file mode 100644 index 0000000000000..45a54f28e7f12 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryProvisioningState.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 Service Registry. + public readonly partial struct ServiceRegistryProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ServiceRegistryProvisioningState(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 ServiceRegistryProvisioningState Creating { get; } = new ServiceRegistryProvisioningState(CreatingValue); + /// Updating. + public static ServiceRegistryProvisioningState Updating { get; } = new ServiceRegistryProvisioningState(UpdatingValue); + /// Succeeded. + public static ServiceRegistryProvisioningState Succeeded { get; } = new ServiceRegistryProvisioningState(SucceededValue); + /// Failed. + public static ServiceRegistryProvisioningState Failed { get; } = new ServiceRegistryProvisioningState(FailedValue); + /// Deleting. + public static ServiceRegistryProvisioningState Deleting { get; } = new ServiceRegistryProvisioningState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(ServiceRegistryProvisioningState left, ServiceRegistryProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ServiceRegistryProvisioningState left, ServiceRegistryProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ServiceRegistryProvisioningState(string value) => new ServiceRegistryProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ServiceRegistryProvisioningState other && Equals(other); + /// + public bool Equals(ServiceRegistryProvisioningState 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/ServiceRegistryResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceCollection.Serialization.cs new file mode 100644 index 0000000000000..417761fff5fc6 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceCollection.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class ServiceRegistryResourceCollection + { + internal static ServiceRegistryResourceCollection DeserializeServiceRegistryResourceCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ServiceRegistryResourceData.DeserializeServiceRegistryResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new ServiceRegistryResourceCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceCollection.cs new file mode 100644 index 0000000000000..8b90728e0c3d8 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceCollection.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 Service Registry resources and a possible link for next set. + internal partial class ServiceRegistryResourceCollection + { + /// Initializes a new instance of ServiceRegistryResourceCollection. + internal ServiceRegistryResourceCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of ServiceRegistryResourceCollection. + /// Collection of Service Registry resources. + /// + /// URL client should use to fetch the next page (per server side paging). + /// It's null for now, added for future use. + /// + internal ServiceRegistryResourceCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of Service Registry 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/ServiceRegistryResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceData.Serialization.cs new file mode 100644 index 0000000000000..60c84e0941aad --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceData.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; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + public partial class ServiceRegistryResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + + internal static ServiceRegistryResourceData DeserializeServiceRegistryResourceData(JsonElement element) + { + Optional properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = ServiceRegistryProperties.DeserializeServiceRegistryProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new ServiceRegistryResourceData(id, name, type, systemData, properties.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceRequests.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceRequests.Serialization.cs new file mode 100644 index 0000000000000..65151625c48fc --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceRequests.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class ServiceRegistryResourceRequests + { + internal static ServiceRegistryResourceRequests DeserializeServiceRegistryResourceRequests(JsonElement element) + { + Optional cpu = default; + Optional memory = default; + Optional instanceCount = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("cpu")) + { + cpu = property.Value.GetString(); + continue; + } + if (property.NameEquals("memory")) + { + memory = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + instanceCount = property.Value.GetInt32(); + continue; + } + } + return new ServiceRegistryResourceRequests(cpu.Value, memory.Value, Optional.ToNullable(instanceCount)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceRequests.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceRequests.cs new file mode 100644 index 0000000000000..875a396d29b74 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceRequests.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Resource request payload of Service Registry. + public partial class ServiceRegistryResourceRequests + { + /// Initializes a new instance of ServiceRegistryResourceRequests. + internal ServiceRegistryResourceRequests() + { + } + + /// Initializes a new instance of ServiceRegistryResourceRequests. + /// Cpu allocated to each Service Registry instance. + /// Memory allocated to each Service Registry instance. + /// Instance count of the Service Registry. + internal ServiceRegistryResourceRequests(string cpu, string memory, int? instanceCount) + { + Cpu = cpu; + Memory = memory; + InstanceCount = instanceCount; + } + + /// Cpu allocated to each Service Registry instance. + public string Cpu { get; } + /// Memory allocated to each Service Registry instance. + public string Memory { get; } + /// Instance count of the Service Registry. + public int? InstanceCount { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceResourceData.Serialization.cs new file mode 100644 index 0000000000000..fcad3b00727fc --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceResourceData.Serialization.cs @@ -0,0 +1,115 @@ +// 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.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + public partial class ServiceResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"); + writer.WriteObjectValue(Sku); + } + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + writer.WritePropertyName("location"); + writer.WriteStringValue(Location); + writer.WriteEndObject(); + } + + internal static ServiceResourceData DeserializeServiceResourceData(JsonElement element) + { + Optional properties = default; + Optional sku = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = ClusterResourceProperties.DeserializeClusterResourceProperties(property.Value); + continue; + } + if (property.NameEquals("sku")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sku = AppPlatformSku.DeserializeAppPlatformSku(property.Value); + continue; + } + if (property.NameEquals("tags")) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location")) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new ServiceResourceData(id, name, type, systemData, tags, location, properties.Value, sku.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceResourceList.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceResourceList.Serialization.cs new file mode 100644 index 0000000000000..a82aef5227d95 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceResourceList.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class ServiceResourceList + { + internal static ServiceResourceList DeserializeServiceResourceList(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ServiceResourceData.DeserializeServiceResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new ServiceResourceList(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceResourceList.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceResourceList.cs new file mode 100644 index 0000000000000..fe660ca9a21a5 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceResourceList.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 Service resources and a possible link for next set. + internal partial class ServiceResourceList + { + /// Initializes a new instance of ServiceResourceList. + internal ServiceResourceList() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of ServiceResourceList. + /// Collection of Service resources. + /// + /// URL client should use to fetch the next page (per server side paging). + /// It's null for now, added for future use. + /// + internal ServiceResourceList(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of Service 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/SkuCapacity.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SkuCapacity.Serialization.cs new file mode 100644 index 0000000000000..79d1df27fa827 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SkuCapacity.Serialization.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class SkuCapacity + { + internal static SkuCapacity DeserializeSkuCapacity(JsonElement element) + { + int minimum = default; + Optional maximum = default; + Optional @default = default; + Optional scaleType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("minimum")) + { + minimum = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maximum")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + maximum = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("default")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + @default = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("scaleType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + scaleType = new SkuScaleType(property.Value.GetString()); + continue; + } + } + return new SkuCapacity(minimum, Optional.ToNullable(maximum), Optional.ToNullable(@default), Optional.ToNullable(scaleType)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SkuCapacity.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SkuCapacity.cs new file mode 100644 index 0000000000000..6cf9ead3cede6 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SkuCapacity.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// The SKU capacity. + public partial class SkuCapacity + { + /// Initializes a new instance of SkuCapacity. + /// Gets or sets the minimum. + internal SkuCapacity(int minimum) + { + Minimum = minimum; + } + + /// Initializes a new instance of SkuCapacity. + /// Gets or sets the minimum. + /// Gets or sets the maximum. + /// Gets or sets the default. + /// Gets or sets the type of the scale. + internal SkuCapacity(int minimum, int? maximum, int? @default, SkuScaleType? scaleType) + { + Minimum = minimum; + Maximum = maximum; + Default = @default; + ScaleType = scaleType; + } + + /// Gets or sets the minimum. + public int Minimum { get; } + /// Gets or sets the maximum. + public int? Maximum { get; } + /// Gets or sets the default. + public int? Default { get; } + /// Gets or sets the type of the scale. + public SkuScaleType? ScaleType { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SkuScaleType.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SkuScaleType.cs new file mode 100644 index 0000000000000..2116169fc1712 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SkuScaleType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Gets or sets the type of the scale. + public readonly partial struct SkuScaleType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SkuScaleType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string ManualValue = "Manual"; + private const string AutomaticValue = "Automatic"; + + /// None. + public static SkuScaleType None { get; } = new SkuScaleType(NoneValue); + /// Manual. + public static SkuScaleType Manual { get; } = new SkuScaleType(ManualValue); + /// Automatic. + public static SkuScaleType Automatic { get; } = new SkuScaleType(AutomaticValue); + /// Determines if two values are the same. + public static bool operator ==(SkuScaleType left, SkuScaleType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SkuScaleType left, SkuScaleType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SkuScaleType(string value) => new SkuScaleType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SkuScaleType other && Equals(other); + /// + public bool Equals(SkuScaleType 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/SourceUploadedUserSourceInfo.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SourceUploadedUserSourceInfo.Serialization.cs new file mode 100644 index 0000000000000..bbc851ffd4aa7 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SourceUploadedUserSourceInfo.Serialization.cs @@ -0,0 +1,81 @@ +// 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 SourceUploadedUserSourceInfo : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ArtifactSelector)) + { + writer.WritePropertyName("artifactSelector"); + writer.WriteStringValue(ArtifactSelector); + } + if (Optional.IsDefined(RuntimeVersion)) + { + writer.WritePropertyName("runtimeVersion"); + writer.WriteStringValue(RuntimeVersion); + } + if (Optional.IsDefined(RelativePath)) + { + writer.WritePropertyName("relativePath"); + writer.WriteStringValue(RelativePath); + } + writer.WritePropertyName("type"); + writer.WriteStringValue(UserSourceInfoType); + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(Version); + } + writer.WriteEndObject(); + } + + internal static SourceUploadedUserSourceInfo DeserializeSourceUploadedUserSourceInfo(JsonElement element) + { + Optional artifactSelector = default; + Optional runtimeVersion = default; + Optional relativePath = default; + string type = default; + Optional version = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("artifactSelector")) + { + artifactSelector = property.Value.GetString(); + continue; + } + if (property.NameEquals("runtimeVersion")) + { + runtimeVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("relativePath")) + { + relativePath = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("version")) + { + version = property.Value.GetString(); + continue; + } + } + return new SourceUploadedUserSourceInfo(type, version.Value, relativePath.Value, artifactSelector.Value, runtimeVersion.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SourceUploadedUserSourceInfo.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SourceUploadedUserSourceInfo.cs new file mode 100644 index 0000000000000..bb24ddf43432d --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SourceUploadedUserSourceInfo.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Uploaded Java source code binary for a deployment. + public partial class SourceUploadedUserSourceInfo : UploadedUserSourceInfo + { + /// Initializes a new instance of SourceUploadedUserSourceInfo. + public SourceUploadedUserSourceInfo() + { + UserSourceInfoType = "Source"; + } + + /// Initializes a new instance of SourceUploadedUserSourceInfo. + /// Type of the source uploaded. + /// Version of the source. + /// Relative path of the storage which stores the source. + /// + /// Selector for the artifact to be used for the deployment for multi-module projects. This should be + /// the relative path to the target module/project. + /// + /// Runtime version of the source file. + internal SourceUploadedUserSourceInfo(string userSourceInfoType, string version, string relativePath, string artifactSelector, string runtimeVersion) : base(userSourceInfoType, version, relativePath) + { + ArtifactSelector = artifactSelector; + RuntimeVersion = runtimeVersion; + UserSourceInfoType = userSourceInfoType ?? "Source"; + } + + /// + /// Selector for the artifact to be used for the deployment for multi-module projects. This should be + /// the relative path to the target module/project. + /// + public string ArtifactSelector { get; set; } + /// Runtime version of the source file. + public string RuntimeVersion { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SsoProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SsoProperties.Serialization.cs new file mode 100644 index 0000000000000..7ede3a14ffe07 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SsoProperties.Serialization.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class SsoProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Scope)) + { + writer.WritePropertyName("scope"); + writer.WriteStartArray(); + foreach (var item in Scope) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ClientId)) + { + writer.WritePropertyName("clientId"); + writer.WriteStringValue(ClientId); + } + if (Optional.IsDefined(ClientSecret)) + { + writer.WritePropertyName("clientSecret"); + writer.WriteStringValue(ClientSecret); + } + if (Optional.IsDefined(IssuerUri)) + { + writer.WritePropertyName("issuerUri"); + writer.WriteStringValue(IssuerUri.AbsoluteUri); + } + writer.WriteEndObject(); + } + + internal static SsoProperties DeserializeSsoProperties(JsonElement element) + { + Optional> scope = default; + Optional clientId = default; + Optional clientSecret = default; + Optional issuerUri = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("scope")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + scope = array; + continue; + } + if (property.NameEquals("clientId")) + { + clientId = property.Value.GetString(); + continue; + } + if (property.NameEquals("clientSecret")) + { + clientSecret = property.Value.GetString(); + continue; + } + if (property.NameEquals("issuerUri")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + issuerUri = null; + continue; + } + issuerUri = new Uri(property.Value.GetString()); + continue; + } + } + return new SsoProperties(Optional.ToList(scope), clientId.Value, clientSecret.Value, issuerUri.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SsoProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SsoProperties.cs new file mode 100644 index 0000000000000..92e8a952b59e3 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SsoProperties.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 SsoProperties + { + /// Initializes a new instance of SsoProperties. + public SsoProperties() + { + Scope = new ChangeTrackingList(); + } + + /// Initializes a new instance of SsoProperties. + /// 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 Issuer Identifier. + internal SsoProperties(IList scope, string clientId, string clientSecret, Uri issuerUri) + { + Scope = scope; + ClientId = clientId; + ClientSecret = clientSecret; + IssuerUri = issuerUri; + } + + /// It defines the specific actions applications can be allowed to do on a user's behalf. + public IList Scope { 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 Issuer Identifier. + public Uri IssuerUri { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StackProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StackProperties.Serialization.cs new file mode 100644 index 0000000000000..ce693aba08c1b --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StackProperties.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class StackProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(Version); + } + writer.WriteEndObject(); + } + + internal static StackProperties DeserializeStackProperties(JsonElement element) + { + Optional id = default; + Optional version = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("version")) + { + version = property.Value.GetString(); + continue; + } + } + return new StackProperties(id.Value, version.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StackProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StackProperties.cs new file mode 100644 index 0000000000000..b9bcc341d5673 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StackProperties.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// KPack ClusterStack properties payload. + public partial class StackProperties + { + /// Initializes a new instance of StackProperties. + public StackProperties() + { + } + + /// Initializes a new instance of StackProperties. + /// Id of the ClusterStack. + /// Version of the ClusterStack. + internal StackProperties(string id, string version) + { + Id = id; + Version = version; + } + + /// Id of the ClusterStack. + public string Id { get; set; } + /// Version of the ClusterStack. + public string Version { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageAccount.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageAccount.Serialization.cs new file mode 100644 index 0000000000000..500c4704fd8dc --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageAccount.Serialization.cs @@ -0,0 +1,53 @@ +// 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 StorageAccount : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("accountName"); + writer.WriteStringValue(AccountName); + writer.WritePropertyName("accountKey"); + writer.WriteStringValue(AccountKey); + writer.WritePropertyName("storageType"); + writer.WriteStringValue(StorageType.ToString()); + writer.WriteEndObject(); + } + + internal static StorageAccount DeserializeStorageAccount(JsonElement element) + { + string accountName = default; + string accountKey = default; + StorageType storageType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("accountName")) + { + accountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("accountKey")) + { + accountKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageType")) + { + storageType = new StorageType(property.Value.GetString()); + continue; + } + } + return new StorageAccount(storageType, accountName, accountKey); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageAccount.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageAccount.cs new file mode 100644 index 0000000000000..37beff04f7664 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageAccount.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// storage resource of type Azure Storage Account. + public partial class StorageAccount : StorageProperties + { + /// Initializes a new instance of StorageAccount. + /// The account name of the Azure Storage Account. + /// The account key of the Azure Storage Account. + /// or is null. + public StorageAccount(string accountName, string accountKey) + { + if (accountName == null) + { + throw new ArgumentNullException(nameof(accountName)); + } + if (accountKey == null) + { + throw new ArgumentNullException(nameof(accountKey)); + } + + AccountName = accountName; + AccountKey = accountKey; + StorageType = StorageType.StorageAccount; + } + + /// Initializes a new instance of StorageAccount. + /// The type of the storage. + /// The account name of the Azure Storage Account. + /// The account key of the Azure Storage Account. + internal StorageAccount(StorageType storageType, string accountName, string accountKey) : base(storageType) + { + AccountName = accountName; + AccountKey = accountKey; + StorageType = storageType; + } + + /// The account name of the Azure Storage Account. + public string AccountName { get; set; } + /// The account key of the Azure Storage Account. + public string AccountKey { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageProperties.Serialization.cs new file mode 100644 index 0000000000000..26d00d6048ea3 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageProperties.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 StorageProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("storageType"); + writer.WriteStringValue(StorageType.ToString()); + writer.WriteEndObject(); + } + + internal static StorageProperties DeserializeStorageProperties(JsonElement element) + { + if (element.TryGetProperty("storageType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "StorageAccount": return StorageAccount.DeserializeStorageAccount(element); + } + } + StorageType storageType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("storageType")) + { + storageType = new StorageType(property.Value.GetString()); + continue; + } + } + return new StorageProperties(storageType); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageProperties.cs new file mode 100644 index 0000000000000..c7ad0beaed09c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageProperties.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Storage resource payload. + public partial class StorageProperties + { + /// Initializes a new instance of StorageProperties. + public StorageProperties() + { + } + + /// Initializes a new instance of StorageProperties. + /// The type of the storage. + internal StorageProperties(StorageType storageType) + { + StorageType = storageType; + } + + /// The type of the storage. + internal StorageType StorageType { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageResourceCollection.Serialization.cs new file mode 100644 index 0000000000000..2919c6c4896a1 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageResourceCollection.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class StorageResourceCollection + { + internal static StorageResourceCollection DeserializeStorageResourceCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(StorageResourceData.DeserializeStorageResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new StorageResourceCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageResourceCollection.cs new file mode 100644 index 0000000000000..1cee11206ce09 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageResourceCollection.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 storage resources list and a possible link for next page. + internal partial class StorageResourceCollection + { + /// Initializes a new instance of StorageResourceCollection. + internal StorageResourceCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of StorageResourceCollection. + /// The storage resources list. + /// The link to next page of storage list. + internal StorageResourceCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// The storage 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/StorageResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageResourceData.Serialization.cs new file mode 100644 index 0000000000000..487dd363837dd --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageResourceData.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; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + public partial class StorageResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + + internal static StorageResourceData DeserializeStorageResourceData(JsonElement element) + { + Optional properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = StorageProperties.DeserializeStorageProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new StorageResourceData(id, name, type, systemData, properties.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageType.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageType.cs new file mode 100644 index 0000000000000..44bc501c43ccb --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// The type of the storage. + internal readonly partial struct StorageType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public StorageType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StorageAccountValue = "StorageAccount"; + + /// StorageAccount. + public static StorageType StorageAccount { get; } = new StorageType(StorageAccountValue); + /// Determines if two values are the same. + public static bool operator ==(StorageType left, StorageType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(StorageType left, StorageType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator StorageType(string value) => new StorageType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is StorageType other && Equals(other); + /// + public bool Equals(StorageType 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/SupportedBuildpackResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpackResourceData.Serialization.cs new file mode 100644 index 0000000000000..88947d1a4c1e6 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpackResourceData.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; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + public partial class SupportedBuildpackResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + + internal static SupportedBuildpackResourceData DeserializeSupportedBuildpackResourceData(JsonElement element) + { + Optional properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = SupportedBuildpackResourceProperties.DeserializeSupportedBuildpackResourceProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new SupportedBuildpackResourceData(id, name, type, systemData, properties.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpackResourceProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpackResourceProperties.Serialization.cs new file mode 100644 index 0000000000000..2a148eb63bb38 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpackResourceProperties.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class SupportedBuildpackResourceProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(BuildpackId)) + { + writer.WritePropertyName("buildpackId"); + writer.WriteStringValue(BuildpackId); + } + writer.WriteEndObject(); + } + + internal static SupportedBuildpackResourceProperties DeserializeSupportedBuildpackResourceProperties(JsonElement element) + { + Optional buildpackId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("buildpackId")) + { + buildpackId = property.Value.GetString(); + continue; + } + } + return new SupportedBuildpackResourceProperties(buildpackId.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpackResourceProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpackResourceProperties.cs new file mode 100644 index 0000000000000..4534530b22758 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpackResourceProperties.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Supported buildpack resource properties. + internal partial class SupportedBuildpackResourceProperties + { + /// Initializes a new instance of SupportedBuildpackResourceProperties. + public SupportedBuildpackResourceProperties() + { + } + + /// Initializes a new instance of SupportedBuildpackResourceProperties. + /// The id of supported buildpack. + internal SupportedBuildpackResourceProperties(string buildpackId) + { + BuildpackId = buildpackId; + } + + /// The id of supported buildpack. + public string BuildpackId { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpacksCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpacksCollection.Serialization.cs new file mode 100644 index 0000000000000..1395e364dfd99 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpacksCollection.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class SupportedBuildpacksCollection + { + internal static SupportedBuildpacksCollection DeserializeSupportedBuildpacksCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SupportedBuildpackResourceData.DeserializeSupportedBuildpackResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new SupportedBuildpacksCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpacksCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpacksCollection.cs new file mode 100644 index 0000000000000..0552eef3763c0 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpacksCollection.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 supported buildpacks resources and a possible link for next set. + internal partial class SupportedBuildpacksCollection + { + /// Initializes a new instance of SupportedBuildpacksCollection. + internal SupportedBuildpacksCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of SupportedBuildpacksCollection. + /// Collection of supported buildpacks resources. + /// + /// URL client should use to fetch the next page (per server side paging). + /// It's null for now, added for future use. + /// + internal SupportedBuildpacksCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of supported buildpacks 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/SupportedRuntimePlatform.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedRuntimePlatform.cs new file mode 100644 index 0000000000000..624639f35b70d --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedRuntimePlatform.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 +{ + /// The platform of this runtime version (possible values: "Java" or ".NET"). + public readonly partial struct SupportedRuntimePlatform : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SupportedRuntimePlatform(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string JavaValue = "Java"; + private const string NETCoreValue = ".NET Core"; + + /// Java. + public static SupportedRuntimePlatform Java { get; } = new SupportedRuntimePlatform(JavaValue); + /// .NET Core. + public static SupportedRuntimePlatform NETCore { get; } = new SupportedRuntimePlatform(NETCoreValue); + /// Determines if two values are the same. + public static bool operator ==(SupportedRuntimePlatform left, SupportedRuntimePlatform right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SupportedRuntimePlatform left, SupportedRuntimePlatform right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SupportedRuntimePlatform(string value) => new SupportedRuntimePlatform(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SupportedRuntimePlatform other && Equals(other); + /// + public bool Equals(SupportedRuntimePlatform 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/SupportedRuntimeValue.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedRuntimeValue.cs new file mode 100644 index 0000000000000..73831f5c043da --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedRuntimeValue.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 +{ + /// The raw value which could be passed to deployment CRUD operations. + public readonly partial struct SupportedRuntimeValue : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SupportedRuntimeValue(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string Java8Value = "Java_8"; + private const string Java11Value = "Java_11"; + private const string Java17Value = "Java_17"; + private const string NetCore31Value = "NetCore_31"; + + /// Java_8. + public static SupportedRuntimeValue Java8 { get; } = new SupportedRuntimeValue(Java8Value); + /// Java_11. + public static SupportedRuntimeValue Java11 { get; } = new SupportedRuntimeValue(Java11Value); + /// Java_17. + public static SupportedRuntimeValue Java17 { get; } = new SupportedRuntimeValue(Java17Value); + /// NetCore_31. + public static SupportedRuntimeValue NetCore31 { get; } = new SupportedRuntimeValue(NetCore31Value); + /// Determines if two values are the same. + public static bool operator ==(SupportedRuntimeValue left, SupportedRuntimeValue right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SupportedRuntimeValue left, SupportedRuntimeValue right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SupportedRuntimeValue(string value) => new SupportedRuntimeValue(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SupportedRuntimeValue other && Equals(other); + /// + public bool Equals(SupportedRuntimeValue 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/SupportedRuntimeVersion.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedRuntimeVersion.Serialization.cs new file mode 100644 index 0000000000000..6f5284ef9d8ef --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedRuntimeVersion.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class SupportedRuntimeVersion + { + internal static SupportedRuntimeVersion DeserializeSupportedRuntimeVersion(JsonElement element) + { + Optional value = default; + Optional platform = default; + Optional version = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + value = new SupportedRuntimeValue(property.Value.GetString()); + continue; + } + if (property.NameEquals("platform")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + platform = new SupportedRuntimePlatform(property.Value.GetString()); + continue; + } + if (property.NameEquals("version")) + { + version = property.Value.GetString(); + continue; + } + } + return new SupportedRuntimeVersion(Optional.ToNullable(value), Optional.ToNullable(platform), version.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedRuntimeVersion.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedRuntimeVersion.cs new file mode 100644 index 0000000000000..ba48468e15735 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedRuntimeVersion.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Supported deployment runtime version descriptor. + public partial class SupportedRuntimeVersion + { + /// Initializes a new instance of SupportedRuntimeVersion. + internal SupportedRuntimeVersion() + { + } + + /// Initializes a new instance of SupportedRuntimeVersion. + /// The raw value which could be passed to deployment CRUD operations. + /// The platform of this runtime version (possible values: "Java" or ".NET"). + /// The detailed version (major.minor) of the platform. + internal SupportedRuntimeVersion(SupportedRuntimeValue? value, SupportedRuntimePlatform? platform, string version) + { + Value = value; + Platform = platform; + Version = version; + } + + /// The raw value which could be passed to deployment CRUD operations. + public SupportedRuntimeValue? Value { get; } + /// The platform of this runtime version (possible values: "Java" or ".NET"). + public SupportedRuntimePlatform? Platform { get; } + /// The detailed version (major.minor) of the platform. + public string Version { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStackResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStackResourceData.Serialization.cs new file mode 100644 index 0000000000000..e0b69c377a271 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStackResourceData.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; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + public partial class SupportedStackResourceData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + + internal static SupportedStackResourceData DeserializeSupportedStackResourceData(JsonElement element) + { + Optional properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = SupportedStackResourceProperties.DeserializeSupportedStackResourceProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new SupportedStackResourceData(id, name, type, systemData, properties.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStackResourceProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStackResourceProperties.Serialization.cs new file mode 100644 index 0000000000000..e9551867f15bf --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStackResourceProperties.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class SupportedStackResourceProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(StackId)) + { + writer.WritePropertyName("stackId"); + writer.WriteStringValue(StackId); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(Version); + } + writer.WriteEndObject(); + } + + internal static SupportedStackResourceProperties DeserializeSupportedStackResourceProperties(JsonElement element) + { + Optional stackId = default; + Optional version = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("stackId")) + { + stackId = property.Value.GetString(); + continue; + } + if (property.NameEquals("version")) + { + version = property.Value.GetString(); + continue; + } + } + return new SupportedStackResourceProperties(stackId.Value, version.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStackResourceProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStackResourceProperties.cs new file mode 100644 index 0000000000000..735efbe23e9d9 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStackResourceProperties.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Supported stack resource properties. + public partial class SupportedStackResourceProperties + { + /// Initializes a new instance of SupportedStackResourceProperties. + public SupportedStackResourceProperties() + { + } + + /// Initializes a new instance of SupportedStackResourceProperties. + /// The id of supported stack. + /// The version of supported stack. + internal SupportedStackResourceProperties(string stackId, string version) + { + StackId = stackId; + Version = version; + } + + /// The id of supported stack. + public string StackId { get; set; } + /// The version of supported stack. + public string Version { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStacksCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStacksCollection.Serialization.cs new file mode 100644 index 0000000000000..a652b20da765a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStacksCollection.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class SupportedStacksCollection + { + internal static SupportedStacksCollection DeserializeSupportedStacksCollection(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SupportedStackResourceData.DeserializeSupportedStackResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new SupportedStacksCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStacksCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStacksCollection.cs new file mode 100644 index 0000000000000..e8a1267abe8e6 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStacksCollection.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 supported stacks resources and a possible link for next set. + internal partial class SupportedStacksCollection + { + /// Initializes a new instance of SupportedStacksCollection. + internal SupportedStacksCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of SupportedStacksCollection. + /// Collection of supported stacks resources. + /// + /// URL client should use to fetch the next page (per server side paging). + /// It's null for now, added for future use. + /// + internal SupportedStacksCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of supported stacks 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/TemporaryDisk.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TemporaryDisk.Serialization.cs new file mode 100644 index 0000000000000..3fcbeb80ada80 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TemporaryDisk.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + public partial class TemporaryDisk : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SizeInGB)) + { + writer.WritePropertyName("sizeInGB"); + writer.WriteNumberValue(SizeInGB.Value); + } + if (Optional.IsDefined(MountPath)) + { + writer.WritePropertyName("mountPath"); + writer.WriteStringValue(MountPath); + } + writer.WriteEndObject(); + } + + internal static TemporaryDisk DeserializeTemporaryDisk(JsonElement element) + { + Optional sizeInGB = default; + Optional mountPath = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sizeInGB")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sizeInGB = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("mountPath")) + { + mountPath = property.Value.GetString(); + continue; + } + } + return new TemporaryDisk(Optional.ToNullable(sizeInGB), mountPath.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TemporaryDisk.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TemporaryDisk.cs new file mode 100644 index 0000000000000..9531d6630a355 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TemporaryDisk.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Temporary disk payload. + public partial class TemporaryDisk + { + /// Initializes a new instance of TemporaryDisk. + public TemporaryDisk() + { + } + + /// Initializes a new instance of TemporaryDisk. + /// Size of the temporary disk in GB. + /// Mount path of the temporary disk. + internal TemporaryDisk(int? sizeInGB, string mountPath) + { + SizeInGB = sizeInGB; + MountPath = mountPath; + } + + /// Size of the temporary disk in GB. + public int? SizeInGB { get; set; } + /// Mount path of the temporary disk. + public string MountPath { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TestKeyType.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TestKeyType.cs new file mode 100644 index 0000000000000..40cd9efc342c5 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TestKeyType.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 +{ + /// Type of the test key. + public readonly partial struct TestKeyType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public TestKeyType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PrimaryValue = "Primary"; + private const string SecondaryValue = "Secondary"; + + /// Primary. + public static TestKeyType Primary { get; } = new TestKeyType(PrimaryValue); + /// Secondary. + public static TestKeyType Secondary { get; } = new TestKeyType(SecondaryValue); + /// Determines if two values are the same. + public static bool operator ==(TestKeyType left, TestKeyType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TestKeyType left, TestKeyType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator TestKeyType(string value) => new TestKeyType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TestKeyType other && Equals(other); + /// + public bool Equals(TestKeyType 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/TestKeys.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TestKeys.Serialization.cs new file mode 100644 index 0000000000000..333f3ec443fab --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TestKeys.Serialization.cs @@ -0,0 +1,58 @@ +// 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 TestKeys + { + internal static TestKeys DeserializeTestKeys(JsonElement element) + { + Optional primaryKey = default; + Optional secondaryKey = default; + Optional primaryTestEndpoint = default; + Optional secondaryTestEndpoint = default; + Optional enabled = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("primaryKey")) + { + primaryKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("secondaryKey")) + { + secondaryKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("primaryTestEndpoint")) + { + primaryTestEndpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("secondaryTestEndpoint")) + { + secondaryTestEndpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("enabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + enabled = property.Value.GetBoolean(); + continue; + } + } + return new TestKeys(primaryKey.Value, secondaryKey.Value, primaryTestEndpoint.Value, secondaryTestEndpoint.Value, Optional.ToNullable(enabled)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TestKeys.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TestKeys.cs new file mode 100644 index 0000000000000..b6f7790099b50 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TestKeys.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Test keys payload. + public partial class TestKeys + { + /// Initializes a new instance of TestKeys. + internal TestKeys() + { + } + + /// Initializes a new instance of TestKeys. + /// Primary key. + /// Secondary key. + /// Primary test endpoint. + /// Secondary test endpoint. + /// Indicates whether the test endpoint feature enabled or not. + internal TestKeys(string primaryKey, string secondaryKey, string primaryTestEndpoint, string secondaryTestEndpoint, bool? enabled) + { + PrimaryKey = primaryKey; + SecondaryKey = secondaryKey; + PrimaryTestEndpoint = primaryTestEndpoint; + SecondaryTestEndpoint = secondaryTestEndpoint; + Enabled = enabled; + } + + /// Primary key. + public string PrimaryKey { get; } + /// Secondary key. + public string SecondaryKey { get; } + /// Primary test endpoint. + public string PrimaryTestEndpoint { get; } + /// Secondary test endpoint. + public string SecondaryTestEndpoint { get; } + /// Indicates whether the test endpoint feature enabled or not. + public bool? Enabled { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TrafficDirection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TrafficDirection.cs new file mode 100644 index 0000000000000..06651376d2c16 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/TrafficDirection.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 +{ + /// The direction of required traffic. + public readonly partial struct TrafficDirection : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public TrafficDirection(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InboundValue = "Inbound"; + private const string OutboundValue = "Outbound"; + + /// Inbound. + public static TrafficDirection Inbound { get; } = new TrafficDirection(InboundValue); + /// Outbound. + public static TrafficDirection Outbound { get; } = new TrafficDirection(OutboundValue); + /// Determines if two values are the same. + public static bool operator ==(TrafficDirection left, TrafficDirection right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TrafficDirection left, TrafficDirection right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator TrafficDirection(string value) => new TrafficDirection(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TrafficDirection other && Equals(other); + /// + public bool Equals(TrafficDirection 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/UnderlyingResourceType.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UnderlyingResourceType.cs new file mode 100644 index 0000000000000..e17b95ae78bf9 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UnderlyingResourceType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// The type of the underlying resource to mount as a persistent disk. + internal readonly partial struct UnderlyingResourceType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public UnderlyingResourceType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AzureFileVolumeValue = "AzureFileVolume"; + + /// AzureFileVolume. + public static UnderlyingResourceType AzureFileVolume { get; } = new UnderlyingResourceType(AzureFileVolumeValue); + /// Determines if two values are the same. + public static bool operator ==(UnderlyingResourceType left, UnderlyingResourceType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(UnderlyingResourceType left, UnderlyingResourceType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator UnderlyingResourceType(string value) => new UnderlyingResourceType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is UnderlyingResourceType other && Equals(other); + /// + public bool Equals(UnderlyingResourceType 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/UploadedUserSourceInfo.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UploadedUserSourceInfo.Serialization.cs new file mode 100644 index 0000000000000..6d9199baf5dab --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UploadedUserSourceInfo.Serialization.cs @@ -0,0 +1,68 @@ +// 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 UploadedUserSourceInfo : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(RelativePath)) + { + writer.WritePropertyName("relativePath"); + writer.WriteStringValue(RelativePath); + } + writer.WritePropertyName("type"); + writer.WriteStringValue(UserSourceInfoType); + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(Version); + } + writer.WriteEndObject(); + } + + internal static UploadedUserSourceInfo DeserializeUploadedUserSourceInfo(JsonElement element) + { + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Jar": return JarUploadedUserSourceInfo.DeserializeJarUploadedUserSourceInfo(element); + case "NetCoreZip": return NetCoreZipUploadedUserSourceInfo.DeserializeNetCoreZipUploadedUserSourceInfo(element); + case "Source": return SourceUploadedUserSourceInfo.DeserializeSourceUploadedUserSourceInfo(element); + } + } + Optional relativePath = default; + string type = default; + Optional version = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("relativePath")) + { + relativePath = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("version")) + { + version = property.Value.GetString(); + continue; + } + } + return new UploadedUserSourceInfo(type, version.Value, relativePath.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UploadedUserSourceInfo.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UploadedUserSourceInfo.cs new file mode 100644 index 0000000000000..86c8cecad7155 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UploadedUserSourceInfo.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Source with uploaded location. + public partial class UploadedUserSourceInfo : UserSourceInfo + { + /// Initializes a new instance of UploadedUserSourceInfo. + public UploadedUserSourceInfo() + { + UserSourceInfoType = "UploadedUserSourceInfo"; + } + + /// Initializes a new instance of UploadedUserSourceInfo. + /// Type of the source uploaded. + /// Version of the source. + /// Relative path of the storage which stores the source. + internal UploadedUserSourceInfo(string userSourceInfoType, string version, string relativePath) : base(userSourceInfoType, version) + { + RelativePath = relativePath; + UserSourceInfoType = userSourceInfoType ?? "UploadedUserSourceInfo"; + } + + /// Relative path of the storage which stores the source. + public string RelativePath { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UserSourceInfo.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UserSourceInfo.Serialization.cs new file mode 100644 index 0000000000000..baa30fdea80ec --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UserSourceInfo.Serialization.cs @@ -0,0 +1,60 @@ +// 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 UserSourceInfo : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(UserSourceInfoType); + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(Version); + } + writer.WriteEndObject(); + } + + internal static UserSourceInfo DeserializeUserSourceInfo(JsonElement element) + { + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "BuildResult": return BuildResultUserSourceInfo.DeserializeBuildResultUserSourceInfo(element); + case "Container": return CustomContainerUserSourceInfo.DeserializeCustomContainerUserSourceInfo(element); + case "Jar": return JarUploadedUserSourceInfo.DeserializeJarUploadedUserSourceInfo(element); + case "NetCoreZip": return NetCoreZipUploadedUserSourceInfo.DeserializeNetCoreZipUploadedUserSourceInfo(element); + case "Source": return SourceUploadedUserSourceInfo.DeserializeSourceUploadedUserSourceInfo(element); + case "UploadedUserSourceInfo": return UploadedUserSourceInfo.DeserializeUploadedUserSourceInfo(element); + } + } + string type = default; + Optional version = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("version")) + { + version = property.Value.GetString(); + continue; + } + } + return new UserSourceInfo(type, version.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UserSourceInfo.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UserSourceInfo.cs new file mode 100644 index 0000000000000..27ca0caac61b0 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/UserSourceInfo.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppPlatform.Models +{ + /// Source information for a deployment. + public partial class UserSourceInfo + { + /// Initializes a new instance of UserSourceInfo. + public UserSourceInfo() + { + } + + /// Initializes a new instance of UserSourceInfo. + /// Type of the source uploaded. + /// Version of the source. + internal UserSourceInfo(string userSourceInfoType, string version) + { + UserSourceInfoType = userSourceInfoType; + Version = version; + } + + /// Type of the source uploaded. + internal string UserSourceInfoType { get; set; } + /// Version of the source. + public string Version { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ValidationMessages.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ValidationMessages.Serialization.cs new file mode 100644 index 0000000000000..1349fd7c4cf53 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ValidationMessages.Serialization.cs @@ -0,0 +1,46 @@ +// 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 ValidationMessages + { + internal static ValidationMessages DeserializeValidationMessages(JsonElement element) + { + Optional name = default; + Optional> messages = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("messages")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + messages = array; + continue; + } + } + return new ValidationMessages(name.Value, Optional.ToList(messages)); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ValidationMessages.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ValidationMessages.cs new file mode 100644 index 0000000000000..930f8c282b76c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ValidationMessages.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 +{ + /// Validate messages of the configuration service git repositories. + public partial class ValidationMessages + { + /// Initializes a new instance of ValidationMessages. + internal ValidationMessages() + { + Messages = new ChangeTrackingList(); + } + + /// Initializes a new instance of ValidationMessages. + /// The name of the configuration service git repository. + /// Detailed validation messages. + internal ValidationMessages(string name, IReadOnlyList messages) + { + Name = name; + Messages = messages; + } + + /// The name of the configuration service git repository. + public string Name { get; } + /// Detailed validation messages. + public IReadOnlyList Messages { get; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/MonitoringSettingResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/MonitoringSettingResource.cs new file mode 100644 index 0000000000000..2b02fd665eaac --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/MonitoringSettingResource.cs @@ -0,0 +1,257 @@ +// 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 MonitoringSettingResource 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 GetMonitoringSettingResource method. + /// Otherwise you can get one from its parent resource using the GetMonitoringSettingResource method. + /// + public partial class MonitoringSettingResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _monitoringSettingResourceMonitoringSettingsClientDiagnostics; + private readonly MonitoringSettingsRestOperations _monitoringSettingResourceMonitoringSettingsRestClient; + private readonly MonitoringSettingResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected MonitoringSettingResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MonitoringSettingResource(ArmClient client, MonitoringSettingResourceData 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 MonitoringSettingResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _monitoringSettingResourceMonitoringSettingsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string monitoringSettingResourceMonitoringSettingsApiVersion); + _monitoringSettingResourceMonitoringSettingsRestClient = new MonitoringSettingsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, monitoringSettingResourceMonitoringSettingsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/monitoringSettings"; + + /// 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 MonitoringSettingResourceData 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 Monitoring Setting and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default + /// Operation Id: MonitoringSettings_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _monitoringSettingResourceMonitoringSettingsClientDiagnostics.CreateScope("MonitoringSettingResource.Get"); + scope.Start(); + try + { + var response = await _monitoringSettingResourceMonitoringSettingsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MonitoringSettingResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Monitoring Setting and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default + /// Operation Id: MonitoringSettings_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _monitoringSettingResourceMonitoringSettingsClientDiagnostics.CreateScope("MonitoringSettingResource.Get"); + scope.Start(); + try + { + var response = _monitoringSettingResourceMonitoringSettingsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MonitoringSettingResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update the Monitoring Setting. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default + /// Operation Id: MonitoringSettings_UpdatePatch + /// + /// 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, MonitoringSettingResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _monitoringSettingResourceMonitoringSettingsClientDiagnostics.CreateScope("MonitoringSettingResource.Update"); + scope.Start(); + try + { + var response = await _monitoringSettingResourceMonitoringSettingsRestClient.UpdatePatchAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new MonitoringSettingResourceOperationSource(Client), _monitoringSettingResourceMonitoringSettingsClientDiagnostics, Pipeline, _monitoringSettingResourceMonitoringSettingsRestClient.CreateUpdatePatchRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update the Monitoring Setting. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default + /// Operation Id: MonitoringSettings_UpdatePatch + /// + /// 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, MonitoringSettingResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _monitoringSettingResourceMonitoringSettingsClientDiagnostics.CreateScope("MonitoringSettingResource.Update"); + scope.Start(); + try + { + var response = _monitoringSettingResourceMonitoringSettingsRestClient.UpdatePatch(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new MonitoringSettingResourceOperationSource(Client), _monitoringSettingResourceMonitoringSettingsClientDiagnostics, Pipeline, _monitoringSettingResourceMonitoringSettingsRestClient.CreateUpdatePatchRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update the Monitoring Setting. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default + /// Operation Id: MonitoringSettings_UpdatePut + /// + /// 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> CreateOrUpdateAsync(WaitUntil waitUntil, MonitoringSettingResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _monitoringSettingResourceMonitoringSettingsClientDiagnostics.CreateScope("MonitoringSettingResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _monitoringSettingResourceMonitoringSettingsRestClient.UpdatePutAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new MonitoringSettingResourceOperationSource(Client), _monitoringSettingResourceMonitoringSettingsClientDiagnostics, Pipeline, _monitoringSettingResourceMonitoringSettingsRestClient.CreateUpdatePutRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update the Monitoring Setting. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default + /// Operation Id: MonitoringSettings_UpdatePut + /// + /// 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 CreateOrUpdate(WaitUntil waitUntil, MonitoringSettingResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _monitoringSettingResourceMonitoringSettingsClientDiagnostics.CreateScope("MonitoringSettingResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = _monitoringSettingResourceMonitoringSettingsRestClient.UpdatePut(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new MonitoringSettingResourceOperationSource(Client), _monitoringSettingResourceMonitoringSettingsClientDiagnostics, Pipeline, _monitoringSettingResourceMonitoringSettingsRestClient.CreateUpdatePutRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + 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/MonitoringSettingResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/MonitoringSettingResourceData.cs new file mode 100644 index 0000000000000..2449acc95635c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/MonitoringSettingResourceData.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class representing the MonitoringSettingResource data model. + public partial class MonitoringSettingResourceData : ResourceData + { + /// Initializes a new instance of MonitoringSettingResourceData. + public MonitoringSettingResourceData() + { + } + + /// Initializes a new instance of MonitoringSettingResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Properties of the Monitoring Setting resource. + internal MonitoringSettingResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MonitoringSettingProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// Properties of the Monitoring Setting resource. + public MonitoringSettingProperties Properties { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ProviderConstants.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ProviderConstants.cs new file mode 100644 index 0000000000000..785dad8edde50 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ProviderConstants.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppPlatform +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApiPortalCustomDomainsRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApiPortalCustomDomainsRestOperations.cs new file mode 100644 index 0000000000000..d642fbc2837c4 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApiPortalCustomDomainsRestOperations.cs @@ -0,0 +1,473 @@ +// 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 ApiPortalCustomDomainsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ApiPortalCustomDomainsRestOperations. + /// 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 ApiPortalCustomDomainsRestOperations(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 ?? "2022-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiPortalName, string domainName) + { + 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("/apiPortals/", false); + uri.AppendPath(apiPortalName, true); + uri.AppendPath("/domains/", false); + uri.AppendPath(domainName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the API portal custom domain. + /// 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 API portal. + /// The name of the API portal custom domain. + /// 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 apiPortalName, string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiPortalName, nameof(apiPortalName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, apiPortalName, domainName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ApiPortalCustomDomainResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ApiPortalCustomDomainResourceData.DeserializeApiPortalCustomDomainResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ApiPortalCustomDomainResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the API portal custom domain. + /// 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 API portal. + /// The name of the API portal custom domain. + /// 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 apiPortalName, string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiPortalName, nameof(apiPortalName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, apiPortalName, domainName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ApiPortalCustomDomainResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ApiPortalCustomDomainResourceData.DeserializeApiPortalCustomDomainResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ApiPortalCustomDomainResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiPortalName, string domainName, ApiPortalCustomDomainResourceData 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("/apiPortals/", false); + uri.AppendPath(apiPortalName, true); + uri.AppendPath("/domains/", false); + uri.AppendPath(domainName, 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 API portal custom domain. + /// 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 API portal. + /// The name of the API portal custom domain. + /// The API portal custom domain 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 apiPortalName, string domainName, ApiPortalCustomDomainResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiPortalName, nameof(apiPortalName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiPortalName, domainName, 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 API portal custom domain. + /// 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 API portal. + /// The name of the API portal custom domain. + /// The API portal custom domain 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 apiPortalName, string domainName, ApiPortalCustomDomainResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiPortalName, nameof(apiPortalName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiPortalName, domainName, 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 apiPortalName, string domainName) + { + 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("/apiPortals/", false); + uri.AppendPath(apiPortalName, true); + uri.AppendPath("/domains/", false); + uri.AppendPath(domainName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete the API portal custom domain. + /// 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 API portal. + /// The name of the API portal custom domain. + /// 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 apiPortalName, string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiPortalName, nameof(apiPortalName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, apiPortalName, domainName); + 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 API portal custom domain. + /// 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 API portal. + /// The name of the API portal custom domain. + /// 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 apiPortalName, string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiPortalName, nameof(apiPortalName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, apiPortalName, domainName); + _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 CreateListRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiPortalName) + { + 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("/apiPortals/", false); + uri.AppendPath(apiPortalName, true); + uri.AppendPath("/domains", 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 API portal custom domains. + /// 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 API portal. + /// 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 apiPortalName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiPortalName, nameof(apiPortalName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceName, apiPortalName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.ApiPortalCustomDomainResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.ApiPortalCustomDomainResourceCollection.DeserializeApiPortalCustomDomainResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Handle requests to list all API portal custom domains. + /// 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 API portal. + /// 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 apiPortalName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiPortalName, nameof(apiPortalName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceName, apiPortalName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.ApiPortalCustomDomainResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.ApiPortalCustomDomainResourceCollection.DeserializeApiPortalCustomDomainResourceCollection(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 apiPortalName) + { + 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 API portal custom domains. + /// 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 API portal. + /// 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 apiPortalName, 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(apiPortalName, nameof(apiPortalName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, apiPortalName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.ApiPortalCustomDomainResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.ApiPortalCustomDomainResourceCollection.DeserializeApiPortalCustomDomainResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Handle requests to list all API portal custom domains. + /// 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 API portal. + /// 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 apiPortalName, 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(apiPortalName, nameof(apiPortalName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, apiPortalName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.ApiPortalCustomDomainResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.ApiPortalCustomDomainResourceCollection.DeserializeApiPortalCustomDomainResourceCollection(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/ApiPortalsRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApiPortalsRestOperations.cs new file mode 100644 index 0000000000000..2c2d0c8b1428f --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApiPortalsRestOperations.cs @@ -0,0 +1,538 @@ +// 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 ApiPortalsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ApiPortalsRestOperations. + /// 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 ApiPortalsRestOperations(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 ?? "2022-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiPortalName) + { + 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("/apiPortals/", false); + uri.AppendPath(apiPortalName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the API portal 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 API 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 apiPortalName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiPortalName, nameof(apiPortalName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, apiPortalName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ApiPortalResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ApiPortalResourceData.DeserializeApiPortalResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ApiPortalResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the API portal 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 API 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 apiPortalName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiPortalName, nameof(apiPortalName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, apiPortalName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ApiPortalResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ApiPortalResourceData.DeserializeApiPortalResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ApiPortalResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiPortalName, ApiPortalResourceData 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("/apiPortals/", false); + uri.AppendPath(apiPortalName, 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 API portal or update the existing API 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 API portal. + /// The API portal 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 apiPortalName, ApiPortalResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiPortalName, nameof(apiPortalName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiPortalName, 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 API portal or update the existing API 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 API portal. + /// The API portal 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 apiPortalName, ApiPortalResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiPortalName, nameof(apiPortalName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiPortalName, 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 apiPortalName) + { + 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("/apiPortals/", false); + uri.AppendPath(apiPortalName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete the default API 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 API 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 apiPortalName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiPortalName, nameof(apiPortalName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, apiPortalName); + 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 default API 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 API 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 apiPortalName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiPortalName, nameof(apiPortalName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, apiPortalName); + _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 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("/apiPortals", 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.ApiPortalResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.ApiPortalResourceCollection.DeserializeApiPortalResourceCollection(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.ApiPortalResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.ApiPortalResourceCollection.DeserializeApiPortalResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateValidateDomainRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiPortalName, CustomDomainValidatePayload validatePayload) + { + 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("/apiPortals/", false); + uri.AppendPath(apiPortalName, true); + uri.AppendPath("/validateDomain", 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(validatePayload); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Check the domains are valid as well as not in use. + /// 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 API portal. + /// Custom domain payload 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> ValidateDomainAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiPortalName, CustomDomainValidatePayload validatePayload, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiPortalName, nameof(apiPortalName)); + Argument.AssertNotNull(validatePayload, nameof(validatePayload)); + + using var message = CreateValidateDomainRequest(subscriptionId, resourceGroupName, serviceName, apiPortalName, validatePayload); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CustomDomainValidateResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CustomDomainValidateResult.DeserializeCustomDomainValidateResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Check the domains are valid as well as not in use. + /// 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 API portal. + /// Custom domain payload 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 ValidateDomain(string subscriptionId, string resourceGroupName, string serviceName, string apiPortalName, CustomDomainValidatePayload validatePayload, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiPortalName, nameof(apiPortalName)); + Argument.AssertNotNull(validatePayload, nameof(validatePayload)); + + using var message = CreateValidateDomainRequest(subscriptionId, resourceGroupName, serviceName, apiPortalName, validatePayload); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CustomDomainValidateResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CustomDomainValidateResult.DeserializeCustomDomainValidateResult(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) + { + 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.ApiPortalResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.ApiPortalResourceCollection.DeserializeApiPortalResourceCollection(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.ApiPortalResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.ApiPortalResourceCollection.DeserializeApiPortalResourceCollection(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 new file mode 100644 index 0000000000000..7ac36d9cd8bdc --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/AppsRestOperations.cs @@ -0,0 +1,800 @@ +// 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 AppsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AppsRestOperations. + /// 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 AppsRestOperations(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 ?? "2022-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string syncStatus) + { + 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (syncStatus != null) + { + uri.AppendQuery("syncStatus", syncStatus, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get an App 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 the App resource. + /// Indicates whether sync status. + /// 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 appName, string syncStatus = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, appName, syncStatus); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AppResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AppResourceData.DeserializeAppResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AppResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get an App 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 the App resource. + /// Indicates whether sync status. + /// 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 appName, string syncStatus = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, appName, syncStatus); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AppResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AppResourceData.DeserializeAppResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AppResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, AppResourceData 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("/apps/", false); + uri.AppendPath(appName, 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 new App or update an exiting App. + /// 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 App resource. + /// 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 appName, AppResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, appName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a new App or update an exiting App. + /// 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 App resource. + /// 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 appName, AppResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, appName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName) + { + 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Operation to delete an App. + /// 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 App resource. + /// 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 appName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, appName); + 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); + } + } + + /// Operation to delete an App. + /// 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 App resource. + /// 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 appName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, appName); + _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 CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, AppResourceData data) + { + 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("/apps/", false); + uri.AppendPath(appName, 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; + } + + /// Operation to update an exiting App. + /// 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 App resource. + /// 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 UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, AppResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, appName, data); + 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 App. + /// 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 App resource. + /// 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 Update(string subscriptionId, string resourceGroupName, string serviceName, string appName, AppResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, appName, data); + _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(); + 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("/apps", 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.AppResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.AppResourceCollection.DeserializeAppResourceCollection(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.AppResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.AppResourceCollection.DeserializeAppResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetResourceUploadUrlRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName) + { + 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/getResourceUploadUrl", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get an resource upload URL for an App, which may be artifacts or source archive. + /// 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 App resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetResourceUploadUrlAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + + using var message = CreateGetResourceUploadUrlRequest(subscriptionId, resourceGroupName, serviceName, appName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ResourceUploadDefinition value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ResourceUploadDefinition.DeserializeResourceUploadDefinition(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get an resource upload URL for an App, which may be artifacts or source archive. + /// 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 App resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetResourceUploadUrl(string subscriptionId, string resourceGroupName, string serviceName, string appName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + + using var message = CreateGetResourceUploadUrlRequest(subscriptionId, resourceGroupName, serviceName, appName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ResourceUploadDefinition value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ResourceUploadDefinition.DeserializeResourceUploadDefinition(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateSetActiveDeploymentsRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, ActiveDeploymentCollection activeDeploymentCollection) + { + 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/setActiveDeployments", 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(activeDeploymentCollection); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Set existing Deployment under the app as active. + /// 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 App resource. + /// A list of Deployment name to be active. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task SetActiveDeploymentsAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, ActiveDeploymentCollection activeDeploymentCollection, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNull(activeDeploymentCollection, nameof(activeDeploymentCollection)); + + using var message = CreateSetActiveDeploymentsRequest(subscriptionId, resourceGroupName, serviceName, appName, activeDeploymentCollection); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Set existing Deployment under the app as active. + /// 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 App resource. + /// A list of Deployment name to be active. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response SetActiveDeployments(string subscriptionId, string resourceGroupName, string serviceName, string appName, ActiveDeploymentCollection activeDeploymentCollection, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNull(activeDeploymentCollection, nameof(activeDeploymentCollection)); + + using var message = CreateSetActiveDeploymentsRequest(subscriptionId, resourceGroupName, serviceName, appName, activeDeploymentCollection); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateValidateDomainRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, CustomDomainValidatePayload validatePayload) + { + 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/validateDomain", 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(validatePayload); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Check the resource name is valid as well as not in use. + /// 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 App resource. + /// Custom domain payload 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> ValidateDomainAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, CustomDomainValidatePayload validatePayload, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNull(validatePayload, nameof(validatePayload)); + + using var message = CreateValidateDomainRequest(subscriptionId, resourceGroupName, serviceName, appName, validatePayload); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CustomDomainValidateResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CustomDomainValidateResult.DeserializeCustomDomainValidateResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Check the resource name is valid as well as not in use. + /// 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 App resource. + /// Custom domain payload 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 ValidateDomain(string subscriptionId, string resourceGroupName, string serviceName, string appName, CustomDomainValidatePayload validatePayload, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNull(validatePayload, nameof(validatePayload)); + + using var message = CreateValidateDomainRequest(subscriptionId, resourceGroupName, serviceName, appName, validatePayload); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CustomDomainValidateResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CustomDomainValidateResult.DeserializeCustomDomainValidateResult(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) + { + 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.AppResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.AppResourceCollection.DeserializeAppResourceCollection(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.AppResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.AppResourceCollection.DeserializeAppResourceCollection(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/BindingsRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BindingsRestOperations.cs new file mode 100644 index 0000000000000..d0545b73f719b --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BindingsRestOperations.cs @@ -0,0 +1,565 @@ +// 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 BindingsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of BindingsRestOperations. + /// 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 BindingsRestOperations(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 ?? "2022-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string bindingName) + { + 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/bindings/", false); + uri.AppendPath(bindingName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Binding 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 the App resource. + /// The name of the Binding resource. + /// 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 appName, string bindingName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(bindingName, nameof(bindingName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, appName, bindingName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BindingResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = BindingResourceData.DeserializeBindingResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((BindingResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Binding 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 the App resource. + /// The name of the Binding resource. + /// 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 appName, string bindingName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(bindingName, nameof(bindingName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, appName, bindingName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BindingResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = BindingResourceData.DeserializeBindingResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((BindingResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string bindingName, BindingResourceData 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/bindings/", false); + uri.AppendPath(bindingName, 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 new Binding or update an exiting Binding. + /// 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 App resource. + /// The name of the Binding resource. + /// 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 appName, string bindingName, BindingResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(bindingName, nameof(bindingName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, appName, bindingName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a new Binding or update an exiting Binding. + /// 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 App resource. + /// The name of the Binding resource. + /// 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 appName, string bindingName, BindingResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(bindingName, nameof(bindingName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, appName, bindingName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string bindingName) + { + 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/bindings/", false); + uri.AppendPath(bindingName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Operation to delete a Binding. + /// 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 App resource. + /// The name of the Binding resource. + /// 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 appName, string bindingName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(bindingName, nameof(bindingName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, appName, bindingName); + 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); + } + } + + /// Operation to delete a Binding. + /// 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 App resource. + /// The name of the Binding resource. + /// 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 appName, string bindingName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(bindingName, nameof(bindingName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, appName, bindingName); + _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 CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string bindingName, BindingResourceData data) + { + 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/bindings/", false); + uri.AppendPath(bindingName, 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; + } + + /// Operation to update an exiting Binding. + /// 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 App resource. + /// The name of the Binding resource. + /// 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 UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string bindingName, BindingResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(bindingName, nameof(bindingName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, appName, bindingName, data); + 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 Binding. + /// 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 App resource. + /// The name of the Binding resource. + /// 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 Update(string subscriptionId, string resourceGroupName, string serviceName, string appName, string bindingName, BindingResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(bindingName, nameof(bindingName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, appName, bindingName, data); + _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, string appName) + { + 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/bindings", 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 an App. + /// 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 App 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, string appName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceName, appName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.BindingResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.BindingResourceCollection.DeserializeBindingResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Handles requests to list all resources in an App. + /// 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 App 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, string appName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceName, appName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.BindingResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.BindingResourceCollection.DeserializeBindingResourceCollection(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 appName) + { + 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 an App. + /// 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 App 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, string appName, 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(appName, nameof(appName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, appName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.BindingResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.BindingResourceCollection.DeserializeBindingResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Handles requests to list all resources in an App. + /// 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 App 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, string appName, 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(appName, nameof(appName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, appName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.BindingResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.BindingResourceCollection.DeserializeBindingResourceCollection(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/BuildServiceAgentPoolRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceAgentPoolRestOperations.cs new file mode 100644 index 0000000000000..ac5483639afbd --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceAgentPoolRestOperations.cs @@ -0,0 +1,389 @@ +// 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 BuildServiceAgentPoolRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of BuildServiceAgentPoolRestOperations. + /// 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 BuildServiceAgentPoolRestOperations(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 ?? "2022-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName) + { + 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("/buildServices/", false); + uri.AppendPath(buildServiceName, true); + uri.AppendPath("/agentPools", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List build service agent pool. + /// 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 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 buildServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.BuildServiceAgentPoolResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.BuildServiceAgentPoolResourceCollection.DeserializeBuildServiceAgentPoolResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List build service agent pool. + /// 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 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 buildServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.BuildServiceAgentPoolResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.BuildServiceAgentPoolResourceCollection.DeserializeBuildServiceAgentPoolResourceCollection(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 agentPoolName) + { + 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("/buildServices/", false); + uri.AppendPath(buildServiceName, true); + uri.AppendPath("/agentPools/", false); + uri.AppendPath(agentPoolName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get build service agent pool. + /// 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 service agent pool resource. + /// 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 buildServiceName, string agentPoolName, 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(agentPoolName, nameof(agentPoolName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, agentPoolName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BuildServiceAgentPoolResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = BuildServiceAgentPoolResourceData.DeserializeBuildServiceAgentPoolResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((BuildServiceAgentPoolResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get build service agent pool. + /// 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 service agent pool resource. + /// 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 buildServiceName, string agentPoolName, 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(agentPoolName, nameof(agentPoolName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, agentPoolName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BuildServiceAgentPoolResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = BuildServiceAgentPoolResourceData.DeserializeBuildServiceAgentPoolResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((BuildServiceAgentPoolResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdatePutRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string agentPoolName, BuildServiceAgentPoolResourceData 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.AppendPath("/agentPools/", false); + uri.AppendPath(agentPoolName, 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 build service agent pool. + /// 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 service agent pool resource. + /// 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 UpdatePutAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string agentPoolName, BuildServiceAgentPoolResourceData 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.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdatePutRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, agentPoolName, 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 build service agent pool. + /// 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 service agent pool resource. + /// 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 UpdatePut(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string agentPoolName, BuildServiceAgentPoolResourceData 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.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdatePutRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, agentPoolName, 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, string buildServiceName) + { + 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 build service agent pool. + /// 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 build 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, string buildServiceName, 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(buildServiceName, nameof(buildServiceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, buildServiceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.BuildServiceAgentPoolResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.BuildServiceAgentPoolResourceCollection.DeserializeBuildServiceAgentPoolResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List build service agent pool. + /// 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 build 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, string buildServiceName, 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(buildServiceName, nameof(buildServiceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, buildServiceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.BuildServiceAgentPoolResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.BuildServiceAgentPoolResourceCollection.DeserializeBuildServiceAgentPoolResourceCollection(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/BuildServiceBuilderRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceBuilderRestOperations.cs new file mode 100644 index 0000000000000..1807023e95b5d --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceBuilderRestOperations.cs @@ -0,0 +1,473 @@ +// 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 BuildServiceBuilderRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of BuildServiceBuilderRestOperations. + /// 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 BuildServiceBuilderRestOperations(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 ?? "2022-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string builderName) + { + 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("/buildServices/", false); + uri.AppendPath(buildServiceName, true); + uri.AppendPath("/builders/", false); + uri.AppendPath(builderName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a KPack builder. + /// 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 builder resource. + /// 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 buildServiceName, string builderName, 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(builderName, nameof(builderName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, builderName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BuilderResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = BuilderResourceData.DeserializeBuilderResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((BuilderResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a KPack builder. + /// 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 builder resource. + /// 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 buildServiceName, string builderName, 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(builderName, nameof(builderName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, builderName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BuilderResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = BuilderResourceData.DeserializeBuilderResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((BuilderResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string builderName, BuilderResourceData 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.AppendPath("/builders/", false); + uri.AppendPath(builderName, 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 a KPack builder. + /// 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 builder resource. + /// The target builder 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 buildServiceName, string builderName, BuilderResourceData 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.AssertNotNullOrEmpty(builderName, nameof(builderName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, builderName, 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 a KPack builder. + /// 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 builder resource. + /// The target builder 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 buildServiceName, string builderName, BuilderResourceData 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.AssertNotNullOrEmpty(builderName, nameof(builderName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, builderName, 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 buildServiceName, string builderName) + { + 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("/builders/", false); + uri.AppendPath(builderName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a KPack builder. + /// 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 builder resource. + /// 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 buildServiceName, string builderName, 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(builderName, nameof(builderName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, builderName); + 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 builder. + /// 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 builder resource. + /// 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 buildServiceName, string builderName, 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(builderName, nameof(builderName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, builderName); + _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 CreateListRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName) + { + 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("/buildServices/", false); + uri.AppendPath(buildServiceName, true); + uri.AppendPath("/builders", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List KPack builders result. + /// 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 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 buildServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.BuilderResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.BuilderResourceCollection.DeserializeBuilderResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List KPack builders result. + /// 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 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 buildServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.BuilderResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.BuilderResourceCollection.DeserializeBuilderResourceCollection(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) + { + 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 KPack builders result. + /// 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 build 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, string buildServiceName, 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(buildServiceName, nameof(buildServiceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, buildServiceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.BuilderResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.BuilderResourceCollection.DeserializeBuilderResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List KPack builders result. + /// 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 build 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, string buildServiceName, 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(buildServiceName, nameof(buildServiceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, buildServiceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.BuilderResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.BuilderResourceCollection.DeserializeBuilderResourceCollection(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/BuildServiceRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceRestOperations.cs new file mode 100644 index 0000000000000..01f53eaa43e74 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceRestOperations.cs @@ -0,0 +1,1457 @@ +// 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 BuildServiceRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of BuildServiceRestOperations. + /// 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 BuildServiceRestOperations(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 ?? "2022-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListBuildServicesRequest(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("/buildServices", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List build services 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> ListBuildServicesAsync(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 = CreateListBuildServicesRequest(subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.BuildServiceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.BuildServiceCollection.DeserializeBuildServiceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List build services 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 ListBuildServices(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 = CreateListBuildServicesRequest(subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.BuildServiceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.BuildServiceCollection.DeserializeBuildServiceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetBuildServiceRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName) + { + 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("/buildServices/", false); + uri.AppendPath(buildServiceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get 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. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetBuildServiceAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); + + using var message = CreateGetBuildServiceRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BuildServiceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = BuildServiceData.DeserializeBuildServiceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((BuildServiceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get 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. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetBuildService(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); + + using var message = CreateGetBuildServiceRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BuildServiceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = BuildServiceData.DeserializeBuildServiceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((BuildServiceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBuildsRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName) + { + 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("/buildServices/", false); + uri.AppendPath(buildServiceName, true); + uri.AppendPath("/builds", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List KPack builds. + /// 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 cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListBuildsAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); + + using var message = CreateListBuildsRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.BuildCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.BuildCollection.DeserializeBuildCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List KPack builds. + /// 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 cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListBuilds(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); + + using var message = CreateListBuildsRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.BuildCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.BuildCollection.DeserializeBuildCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetBuildRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName) + { + 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("/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; + } + + /// Get 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> GetBuildAsync(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 = CreateGetBuildRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, buildName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BuildData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = BuildData.DeserializeBuildData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((BuildData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get 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 GetBuild(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 = CreateGetBuildRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, buildName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BuildData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = BuildData.DeserializeBuildData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((BuildData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateBuildRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, BuildData 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.AppendPath("/builds/", false); + uri.AppendPath(buildName, 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 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. + /// 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> CreateOrUpdateBuildAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, BuildData 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.AssertNotNullOrEmpty(buildName, nameof(buildName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateBuildRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, buildName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + BuildData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = BuildData.DeserializeBuildData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update 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. + /// 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 CreateOrUpdateBuild(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, BuildData 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.AssertNotNullOrEmpty(buildName, nameof(buildName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateBuildRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, buildName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + BuildData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = BuildData.DeserializeBuildData(document.RootElement); + return Response.FromValue(value, 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(); + 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("/buildServices/", false); + uri.AppendPath(buildServiceName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendPath("/results", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List KPack build 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 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> ListBuildResultsAsync(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 = CreateListBuildResultsRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, buildName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.BuildResultCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.BuildResultCollection.DeserializeBuildResultCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List KPack build 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 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 ListBuildResults(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 = CreateListBuildResultsRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, buildName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.BuildResultCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.BuildResultCollection.DeserializeBuildResultCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetBuildResultRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, string buildResultName) + { + 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("/buildServices/", false); + uri.AppendPath(buildServiceName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendPath("/results/", false); + uri.AppendPath(buildResultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a KPack build result. + /// 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 name of the build result resource. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetBuildResultAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, string buildResultName, 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)); + Argument.AssertNotNullOrEmpty(buildResultName, nameof(buildResultName)); + + using var message = CreateGetBuildResultRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, buildName, buildResultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BuildResultData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = BuildResultData.DeserializeBuildResultData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((BuildResultData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a KPack build result. + /// 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 name of the build result resource. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response GetBuildResult(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, string buildResultName, 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)); + Argument.AssertNotNullOrEmpty(buildResultName, nameof(buildResultName)); + + using var message = CreateGetBuildResultRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, buildName, buildResultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BuildResultData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = BuildResultData.DeserializeBuildResultData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((BuildResultData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetBuildResultLogRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, string buildResultName) + { + 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("/buildServices/", false); + uri.AppendPath(buildServiceName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendPath("/results/", false); + uri.AppendPath(buildResultName, true); + uri.AppendPath("/getLogFileUrl", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a KPack build result log download URL. + /// 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 name of the build result resource. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetBuildResultLogAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, string buildResultName, 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)); + Argument.AssertNotNullOrEmpty(buildResultName, nameof(buildResultName)); + + using var message = CreateGetBuildResultLogRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, buildName, buildResultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BuildResultLog value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = BuildResultLog.DeserializeBuildResultLog(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a KPack build result log download URL. + /// 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 name of the build result resource. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response GetBuildResultLog(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, string buildResultName, 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)); + Argument.AssertNotNullOrEmpty(buildResultName, nameof(buildResultName)); + + using var message = CreateGetBuildResultLogRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, buildName, buildResultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BuildResultLog value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = BuildResultLog.DeserializeBuildResultLog(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetResourceUploadUrlRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName) + { + 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("/buildServices/", false); + uri.AppendPath(buildServiceName, true); + uri.AppendPath("/getResourceUploadUrl", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get an resource upload URL for build service, which may be artifacts or source archive. + /// 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 cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetResourceUploadUrlAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); + + using var message = CreateGetResourceUploadUrlRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ResourceUploadDefinition value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ResourceUploadDefinition.DeserializeResourceUploadDefinition(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get an resource upload URL for build service, which may be artifacts or source archive. + /// 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 cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetResourceUploadUrl(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); + + using var message = CreateGetResourceUploadUrlRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ResourceUploadDefinition value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ResourceUploadDefinition.DeserializeResourceUploadDefinition(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListSupportedBuildpacksRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName) + { + 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("/buildServices/", false); + uri.AppendPath(buildServiceName, true); + uri.AppendPath("/supportedBuildpacks", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get all supported buildpacks. + /// 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 cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListSupportedBuildpacksAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); + + using var message = CreateListSupportedBuildpacksRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SupportedBuildpacksCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SupportedBuildpacksCollection.DeserializeSupportedBuildpacksCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get all supported buildpacks. + /// 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 cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListSupportedBuildpacks(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); + + using var message = CreateListSupportedBuildpacksRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SupportedBuildpacksCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SupportedBuildpacksCollection.DeserializeSupportedBuildpacksCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetSupportedBuildpackRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildpackName) + { + 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("/buildServices/", false); + uri.AppendPath(buildServiceName, true); + uri.AppendPath("/supportedBuildpacks/", false); + uri.AppendPath(buildpackName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the supported buildpack 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. + /// The name of the buildpack resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetSupportedBuildpackAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildpackName, 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(buildpackName, nameof(buildpackName)); + + using var message = CreateGetSupportedBuildpackRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, buildpackName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SupportedBuildpackResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SupportedBuildpackResourceData.DeserializeSupportedBuildpackResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SupportedBuildpackResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the supported buildpack 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. + /// The name of the buildpack resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetSupportedBuildpack(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildpackName, 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(buildpackName, nameof(buildpackName)); + + using var message = CreateGetSupportedBuildpackRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, buildpackName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SupportedBuildpackResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SupportedBuildpackResourceData.DeserializeSupportedBuildpackResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SupportedBuildpackResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListSupportedStacksRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName) + { + 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("/buildServices/", false); + uri.AppendPath(buildServiceName, true); + uri.AppendPath("/supportedStacks", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get all supported stacks. + /// 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 cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListSupportedStacksAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); + + using var message = CreateListSupportedStacksRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SupportedStacksCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SupportedStacksCollection.DeserializeSupportedStacksCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get all supported stacks. + /// 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 cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListSupportedStacks(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); + + using var message = CreateListSupportedStacksRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SupportedStacksCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SupportedStacksCollection.DeserializeSupportedStacksCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetSupportedStackRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string stackName) + { + 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("/buildServices/", false); + uri.AppendPath(buildServiceName, true); + uri.AppendPath("/supportedStacks/", false); + uri.AppendPath(stackName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the supported stack 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. + /// The name of the stack resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetSupportedStackAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string stackName, 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(stackName, nameof(stackName)); + + using var message = CreateGetSupportedStackRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, stackName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SupportedStackResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SupportedStackResourceData.DeserializeSupportedStackResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SupportedStackResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the supported stack 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. + /// The name of the stack resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetSupportedStack(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string stackName, 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(stackName, nameof(stackName)); + + using var message = CreateGetSupportedStackRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, stackName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SupportedStackResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SupportedStackResourceData.DeserializeSupportedStackResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SupportedStackResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBuildServicesNextPageRequest(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 build services 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> ListBuildServicesNextPageAsync(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 = CreateListBuildServicesNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.BuildServiceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.BuildServiceCollection.DeserializeBuildServiceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List build services 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 ListBuildServicesNextPage(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 = CreateListBuildServicesNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.BuildServiceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.BuildServiceCollection.DeserializeBuildServiceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBuildsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName) + { + 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 KPack builds. + /// 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 build 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> ListBuildsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, 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(buildServiceName, nameof(buildServiceName)); + + using var message = CreateListBuildsNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, buildServiceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.BuildCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.BuildCollection.DeserializeBuildCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List KPack builds. + /// 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 build service resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListBuildsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, 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(buildServiceName, nameof(buildServiceName)); + + using var message = CreateListBuildsNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, buildServiceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.BuildCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.BuildCollection.DeserializeBuildCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBuildResultsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName) + { + 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 KPack build results. + /// 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 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> ListBuildResultsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, 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(buildServiceName, nameof(buildServiceName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var message = CreateListBuildResultsNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, buildServiceName, buildName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.BuildResultCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.BuildResultCollection.DeserializeBuildResultCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List KPack build results. + /// 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 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 ListBuildResultsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, 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(buildServiceName, nameof(buildServiceName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var message = CreateListBuildResultsNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, buildServiceName, buildName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.BuildResultCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.BuildResultCollection.DeserializeBuildResultCollection(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/BuildpackBindingRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildpackBindingRestOperations.cs new file mode 100644 index 0000000000000..2b267795b0c2b --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildpackBindingRestOperations.cs @@ -0,0 +1,501 @@ +// 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 BuildpackBindingRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of BuildpackBindingRestOperations. + /// 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 BuildpackBindingRestOperations(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 ?? "2022-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string builderName, string buildpackBindingName) + { + 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("/buildServices/", false); + uri.AppendPath(buildServiceName, true); + uri.AppendPath("/builders/", false); + uri.AppendPath(builderName, true); + uri.AppendPath("/buildpackBindings/", false); + uri.AppendPath(buildpackBindingName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a buildpack binding by name. + /// 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 builder resource. + /// The name of the Buildpack Binding Name. + /// 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 buildServiceName, string builderName, string buildpackBindingName, 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(builderName, nameof(builderName)); + Argument.AssertNotNullOrEmpty(buildpackBindingName, nameof(buildpackBindingName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, builderName, buildpackBindingName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BuildpackBindingResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = BuildpackBindingResourceData.DeserializeBuildpackBindingResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((BuildpackBindingResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a buildpack binding by name. + /// 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 builder resource. + /// The name of the Buildpack Binding Name. + /// 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 buildServiceName, string builderName, string buildpackBindingName, 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(builderName, nameof(builderName)); + Argument.AssertNotNullOrEmpty(buildpackBindingName, nameof(buildpackBindingName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, builderName, buildpackBindingName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BuildpackBindingResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = BuildpackBindingResourceData.DeserializeBuildpackBindingResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((BuildpackBindingResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string builderName, string buildpackBindingName, BuildpackBindingResourceData 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.AppendPath("/builders/", false); + uri.AppendPath(builderName, true); + uri.AppendPath("/buildpackBindings/", false); + uri.AppendPath(buildpackBindingName, 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 a buildpack binding. + /// 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 builder resource. + /// The name of the Buildpack Binding Name. + /// The target buildpack binding 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 buildServiceName, string builderName, string buildpackBindingName, BuildpackBindingResourceData 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.AssertNotNullOrEmpty(builderName, nameof(builderName)); + Argument.AssertNotNullOrEmpty(buildpackBindingName, nameof(buildpackBindingName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, builderName, buildpackBindingName, 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 a buildpack binding. + /// 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 builder resource. + /// The name of the Buildpack Binding Name. + /// The target buildpack binding 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 buildServiceName, string builderName, string buildpackBindingName, BuildpackBindingResourceData 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.AssertNotNullOrEmpty(builderName, nameof(builderName)); + Argument.AssertNotNullOrEmpty(buildpackBindingName, nameof(buildpackBindingName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, builderName, buildpackBindingName, 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 buildServiceName, string builderName, string buildpackBindingName) + { + 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("/builders/", false); + uri.AppendPath(builderName, true); + uri.AppendPath("/buildpackBindings/", false); + uri.AppendPath(buildpackBindingName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Operation to delete a Buildpack Binding. + /// 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 builder resource. + /// The name of the Buildpack Binding Name. + /// 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 buildServiceName, string builderName, string buildpackBindingName, 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(builderName, nameof(builderName)); + Argument.AssertNotNullOrEmpty(buildpackBindingName, nameof(buildpackBindingName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, builderName, buildpackBindingName); + 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); + } + } + + /// Operation to delete a Buildpack Binding. + /// 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 builder resource. + /// The name of the Buildpack Binding Name. + /// 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 buildServiceName, string builderName, string buildpackBindingName, 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(builderName, nameof(builderName)); + Argument.AssertNotNullOrEmpty(buildpackBindingName, nameof(buildpackBindingName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, builderName, buildpackBindingName); + _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 CreateListRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string builderName) + { + 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("/buildServices/", false); + uri.AppendPath(buildServiceName, true); + uri.AppendPath("/builders/", false); + uri.AppendPath(builderName, 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; + } + + /// Handles requests to list all buildpack bindings in a builder. + /// 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 builder 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, string buildServiceName, string builderName, 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(builderName, nameof(builderName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, builderName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.BuildpackBindingResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.BuildpackBindingResourceCollection.DeserializeBuildpackBindingResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Handles requests to list all buildpack bindings in a builder. + /// 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 builder 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, string buildServiceName, string builderName, 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(builderName, nameof(builderName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName, builderName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.BuildpackBindingResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.BuildpackBindingResourceCollection.DeserializeBuildpackBindingResourceCollection(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(); + 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 buildpack bindings in a builder. + /// 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 build service resource. + /// The name of the builder 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, string buildServiceName, string builderName, 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(buildServiceName, nameof(buildServiceName)); + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, buildServiceName, builderName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.BuildpackBindingResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.BuildpackBindingResourceCollection.DeserializeBuildpackBindingResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Handles requests to list all buildpack bindings in a builder. + /// 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 build service resource. + /// The name of the builder 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, string buildServiceName, string builderName, 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(buildServiceName, nameof(buildServiceName)); + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, buildServiceName, builderName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.BuildpackBindingResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.BuildpackBindingResourceCollection.DeserializeBuildpackBindingResourceCollection(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/CertificatesRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/CertificatesRestOperations.cs new file mode 100644 index 0000000000000..db274566b28fd --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/CertificatesRestOperations.cs @@ -0,0 +1,447 @@ +// 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 CertificatesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of CertificatesRestOperations. + /// 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 CertificatesRestOperations(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 ?? "2022-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string certificateName) + { + 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("/certificates/", false); + uri.AppendPath(certificateName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the certificate 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 certificate resource. + /// 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 certificateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(certificateName, nameof(certificateName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, certificateName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CertificateResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CertificateResourceData.DeserializeCertificateResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((CertificateResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the certificate 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 certificate resource. + /// 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 certificateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(certificateName, nameof(certificateName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, certificateName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CertificateResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CertificateResourceData.DeserializeCertificateResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((CertificateResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string certificateName, CertificateResourceData 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("/certificates/", false); + uri.AppendPath(certificateName, 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 certificate 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 certificate resource. + /// 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 certificateName, CertificateResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(certificateName, nameof(certificateName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, certificateName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update certificate 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 certificate resource. + /// 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 certificateName, CertificateResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(certificateName, nameof(certificateName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, certificateName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string certificateName) + { + 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("/certificates/", false); + uri.AppendPath(certificateName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete the certificate 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 certificate resource. + /// 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 certificateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(certificateName, nameof(certificateName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, certificateName); + 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 certificate 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 certificate resource. + /// 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 certificateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(certificateName, nameof(certificateName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, certificateName); + _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 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("/certificates", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all the certificates of one user. + /// 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.CertificateResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.CertificateResourceCollection.DeserializeCertificateResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all the certificates of one user. + /// 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.CertificateResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.CertificateResourceCollection.DeserializeCertificateResourceCollection(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) + { + 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 all the certificates of one user. + /// 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.CertificateResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.CertificateResourceCollection.DeserializeCertificateResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all the certificates of one user. + /// 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.CertificateResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.CertificateResourceCollection.DeserializeCertificateResourceCollection(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/ConfigServersRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ConfigServersRestOperations.cs new file mode 100644 index 0000000000000..12b059453f8ef --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ConfigServersRestOperations.cs @@ -0,0 +1,360 @@ +// 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 ConfigServersRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ConfigServersRestOperations. + /// 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 ConfigServersRestOperations(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 ?? "2022-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(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("/configServers/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the config server 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 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, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ConfigServerResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ConfigServerResourceData.DeserializeConfigServerResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ConfigServerResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the config server 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 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, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ConfigServerResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ConfigServerResourceData.DeserializeConfigServerResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ConfigServerResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdatePutRequest(string subscriptionId, string resourceGroupName, string serviceName, ConfigServerResourceData 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("/configServers/default", 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(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update the config server. + /// 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. + /// 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 UpdatePutAsync(string subscriptionId, string resourceGroupName, string serviceName, ConfigServerResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdatePutRequest(subscriptionId, resourceGroupName, serviceName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update the config server. + /// 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. + /// 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 UpdatePut(string subscriptionId, string resourceGroupName, string serviceName, ConfigServerResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdatePutRequest(subscriptionId, resourceGroupName, serviceName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdatePatchRequest(string subscriptionId, string resourceGroupName, string serviceName, ConfigServerResourceData data) + { + 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("/configServers/default", 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(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update the config server. + /// 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. + /// 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 UpdatePatchAsync(string subscriptionId, string resourceGroupName, string serviceName, ConfigServerResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdatePatchRequest(subscriptionId, resourceGroupName, serviceName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update the config server. + /// 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. + /// 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 UpdatePatch(string subscriptionId, string resourceGroupName, string serviceName, ConfigServerResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdatePatchRequest(subscriptionId, resourceGroupName, serviceName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateValidateRequest(string subscriptionId, string resourceGroupName, string serviceName, ConfigServerSettings configServerSettings) + { + 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("/configServers/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(configServerSettings); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Check if the config server settings 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. + /// Config server settings 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, ConfigServerSettings configServerSettings, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNull(configServerSettings, nameof(configServerSettings)); + + using var message = CreateValidateRequest(subscriptionId, resourceGroupName, serviceName, configServerSettings); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Check if the config server settings 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. + /// Config server settings 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, ConfigServerSettings configServerSettings, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNull(configServerSettings, nameof(configServerSettings)); + + using var message = CreateValidateRequest(subscriptionId, resourceGroupName, serviceName, configServerSettings); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ConfigurationServicesRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ConfigurationServicesRestOperations.cs new file mode 100644 index 0000000000000..47da6bef28286 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ConfigurationServicesRestOperations.cs @@ -0,0 +1,530 @@ +// 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 ConfigurationServicesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ConfigurationServicesRestOperations. + /// 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 ConfigurationServicesRestOperations(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 ?? "2022-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string configurationServiceName) + { + 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("/configurationServices/", false); + uri.AppendPath(configurationServiceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the Application Configuration Service 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 Configuration Service. + /// 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 configurationServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(configurationServiceName, nameof(configurationServiceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, configurationServiceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ConfigurationServiceResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ConfigurationServiceResourceData.DeserializeConfigurationServiceResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ConfigurationServiceResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the Application Configuration Service 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 Configuration Service. + /// 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 configurationServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(configurationServiceName, nameof(configurationServiceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, configurationServiceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ConfigurationServiceResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ConfigurationServiceResourceData.DeserializeConfigurationServiceResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ConfigurationServiceResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string configurationServiceName, ConfigurationServiceResourceData 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("/configurationServices/", false); + uri.AppendPath(configurationServiceName, 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 Configuration Service or update the existing Application Configuration 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 name of Application Configuration Service. + /// 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 configurationServiceName, ConfigurationServiceResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(configurationServiceName, nameof(configurationServiceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, configurationServiceName, 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 Configuration Service or update the existing Application Configuration 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 name of Application Configuration Service. + /// 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 configurationServiceName, ConfigurationServiceResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(configurationServiceName, nameof(configurationServiceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, configurationServiceName, 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 configurationServiceName) + { + 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("/configurationServices/", false); + uri.AppendPath(configurationServiceName, 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 Configuration 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 name of Application Configuration Service. + /// 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 configurationServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(configurationServiceName, nameof(configurationServiceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, configurationServiceName); + 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 Configuration 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 name of Application Configuration Service. + /// 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 configurationServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(configurationServiceName, nameof(configurationServiceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, configurationServiceName); + _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 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("/configurationServices", 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.ConfigurationServiceResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.ConfigurationServiceResourceCollection.DeserializeConfigurationServiceResourceCollection(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.ConfigurationServiceResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.ConfigurationServiceResourceCollection.DeserializeConfigurationServiceResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateValidateRequest(string subscriptionId, string resourceGroupName, string serviceName, string configurationServiceName, ConfigurationServiceSettings settings) + { + 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("/configurationServices/", false); + uri.AppendPath(configurationServiceName, 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(settings); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Check if the Application Configuration Service settings 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 Application Configuration Service. + /// Application Configuration Service settings 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 configurationServiceName, ConfigurationServiceSettings settings, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(configurationServiceName, nameof(configurationServiceName)); + Argument.AssertNotNull(settings, nameof(settings)); + + using var message = CreateValidateRequest(subscriptionId, resourceGroupName, serviceName, configurationServiceName, settings); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Check if the Application Configuration Service settings 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 Application Configuration Service. + /// Application Configuration Service settings 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 configurationServiceName, ConfigurationServiceSettings settings, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(configurationServiceName, nameof(configurationServiceName)); + Argument.AssertNotNull(settings, nameof(settings)); + + using var message = CreateValidateRequest(subscriptionId, resourceGroupName, serviceName, configurationServiceName, settings); + _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) + { + 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.ConfigurationServiceResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.ConfigurationServiceResourceCollection.DeserializeConfigurationServiceResourceCollection(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.ConfigurationServiceResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.ConfigurationServiceResourceCollection.DeserializeConfigurationServiceResourceCollection(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 new file mode 100644 index 0000000000000..506ab5f5a015e --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/CustomDomainsRestOperations.cs @@ -0,0 +1,565 @@ +// 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 CustomDomainsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of CustomDomainsRestOperations. + /// 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 CustomDomainsRestOperations(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 ?? "2022-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string domainName) + { + 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/domains/", false); + uri.AppendPath(domainName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the custom domain of one lifecycle application. + /// 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 App resource. + /// The name of the custom domain resource. + /// 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 appName, string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, appName, domainName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CustomDomainResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CustomDomainResourceData.DeserializeCustomDomainResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((CustomDomainResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the custom domain of one lifecycle application. + /// 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 App resource. + /// The name of the custom domain resource. + /// 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 appName, string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, appName, domainName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CustomDomainResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CustomDomainResourceData.DeserializeCustomDomainResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((CustomDomainResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string domainName, CustomDomainResourceData 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/domains/", false); + uri.AppendPath(domainName, 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 custom domain of one lifecycle application. + /// 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 App resource. + /// The name of the custom domain resource. + /// 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 appName, string domainName, CustomDomainResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, appName, domainName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update custom domain of one lifecycle application. + /// 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 App resource. + /// The name of the custom domain resource. + /// 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 appName, string domainName, CustomDomainResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, appName, domainName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string domainName) + { + 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/domains/", false); + uri.AppendPath(domainName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete the custom domain of one lifecycle application. + /// 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 App resource. + /// The name of the custom domain resource. + /// 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 appName, string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, appName, domainName); + 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 custom domain of one lifecycle application. + /// 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 App resource. + /// The name of the custom domain resource. + /// 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 appName, string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, appName, domainName); + _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 CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string domainName, CustomDomainResourceData data) + { + 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/domains/", false); + uri.AppendPath(domainName, 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; + } + + /// Update custom domain of one lifecycle application. + /// 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 App resource. + /// The name of the custom domain resource. + /// 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 UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string domainName, CustomDomainResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, appName, domainName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update custom domain of one lifecycle application. + /// 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 App resource. + /// The name of the custom domain resource. + /// 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 Update(string subscriptionId, string resourceGroupName, string serviceName, string appName, string domainName, CustomDomainResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, appName, domainName, data); + _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, string appName) + { + 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/domains", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List the custom domains of one lifecycle application. + /// 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 App 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, string appName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceName, appName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.CustomDomainResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.CustomDomainResourceCollection.DeserializeCustomDomainResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List the custom domains of one lifecycle application. + /// 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 App 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, string appName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceName, appName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.CustomDomainResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.CustomDomainResourceCollection.DeserializeCustomDomainResourceCollection(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 appName) + { + 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 the custom domains of one lifecycle application. + /// 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 App 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, string appName, 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(appName, nameof(appName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, appName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.CustomDomainResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.CustomDomainResourceCollection.DeserializeCustomDomainResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List the custom domains of one lifecycle application. + /// 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 App 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, string appName, 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(appName, nameof(appName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, appName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.CustomDomainResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.CustomDomainResourceCollection.DeserializeCustomDomainResourceCollection(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 new file mode 100644 index 0000000000000..357b3ec33c32e --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/DeploymentsRestOperations.cs @@ -0,0 +1,1360 @@ +// 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 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 DeploymentsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DeploymentsRestOperations. + /// 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 DeploymentsRestOperations(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 ?? "2022-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName) + { + 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Deployment 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 the App resource. + /// The name of the Deployment resource. + /// 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 appName, string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DeploymentResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DeploymentResourceData.DeserializeDeploymentResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DeploymentResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Deployment 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 the App resource. + /// The name of the Deployment resource. + /// 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 appName, string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DeploymentResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DeploymentResourceData.DeserializeDeploymentResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DeploymentResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DeploymentResourceData 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, 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 new Deployment or update an exiting Deployment. + /// 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 App resource. + /// The name of the Deployment resource. + /// 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 appName, string deploymentName, DeploymentResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a new Deployment or update an exiting Deployment. + /// 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 App resource. + /// The name of the Deployment resource. + /// 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 appName, string deploymentName, DeploymentResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName) + { + 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Operation to delete a Deployment. + /// 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 App resource. + /// The name of the Deployment resource. + /// 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 appName, string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName); + 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); + } + } + + /// Operation to delete a Deployment. + /// 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 App resource. + /// The name of the Deployment resource. + /// 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 appName, string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName); + _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 CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DeploymentResourceData data) + { + 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, 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; + } + + /// Operation to update an exiting Deployment. + /// 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 App resource. + /// The name of the Deployment resource. + /// 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 UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DeploymentResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName, data); + 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 Deployment. + /// 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 App resource. + /// The name of the Deployment resource. + /// 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 Update(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DeploymentResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName, data); + _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, string appName, IEnumerable version) + { + 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/deployments", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (version != null) + { + foreach (var param in version) + { + uri.AppendQuery("version", param, true); + } + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Handles requests to list all resources in an App. + /// 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 App resource. + /// Version of the deployments to be listed. + /// 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 appName, IEnumerable version = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceName, appName, version); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.DeploymentResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.DeploymentResourceCollection.DeserializeDeploymentResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Handles requests to list all resources in an App. + /// 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 App resource. + /// Version of the deployments to be listed. + /// 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 appName, IEnumerable version = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, serviceName, appName, version); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.DeploymentResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.DeploymentResourceCollection.DeserializeDeploymentResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListForClusterRequest(string subscriptionId, string resourceGroupName, string serviceName, IEnumerable version) + { + 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("/deployments", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (version != null) + { + foreach (var param in version) + { + uri.AppendQuery("version", param, true); + } + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List deployments for a certain 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. + /// Version of the deployments to be listed. + /// 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, IEnumerable version = null, 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, version); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.DeploymentResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.DeploymentResourceCollection.DeserializeDeploymentResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List deployments for a certain 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. + /// Version of the deployments to be listed. + /// 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, IEnumerable version = null, 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, version); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.DeploymentResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.DeploymentResourceCollection.DeserializeDeploymentResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName) + { + 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Start the deployment. + /// 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 App resource. + /// The name of the Deployment resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task StartAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Start the deployment. + /// 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 App resource. + /// The name of the Deployment resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Start(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName) + { + 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Stop the deployment. + /// 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 App resource. + /// The name of the Deployment resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task StopAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Stop the deployment. + /// 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 App resource. + /// The name of the Deployment resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Stop(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateRestartRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName) + { + 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, 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 deployment. + /// 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 App resource. + /// The name of the Deployment resource. + /// 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 appName, string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var message = CreateRestartRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName); + 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 deployment. + /// 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 App resource. + /// The name of the Deployment resource. + /// 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 appName, string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var message = CreateRestartRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetLogFileUrlRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName) + { + 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendPath("/getLogFileUrl", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get deployment log file URL. + /// 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 App resource. + /// The name of the Deployment resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetLogFileUrlAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var message = CreateGetLogFileUrlRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LogFileUrlResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = LogFileUrlResponse.DeserializeLogFileUrlResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 204: + return Response.FromValue((LogFileUrlResponse)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get deployment log file URL. + /// 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 App resource. + /// The name of the Deployment resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetLogFileUrl(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var message = CreateGetLogFileUrlRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LogFileUrlResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = LogFileUrlResponse.DeserializeLogFileUrlResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 204: + return Response.FromValue((LogFileUrlResponse)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGenerateHeapDumpRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticParameters diagnosticParameters) + { + 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendPath("/generateHeapDump", 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(diagnosticParameters); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Generate Heap Dump. + /// 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 App resource. + /// The name of the Deployment resource. + /// Parameters for the diagnostic operation. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task GenerateHeapDumpAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); + + using var message = CreateGenerateHeapDumpRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Generate Heap Dump. + /// 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 App resource. + /// The name of the Deployment resource. + /// Parameters for the diagnostic operation. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GenerateHeapDump(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); + + using var message = CreateGenerateHeapDumpRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGenerateThreadDumpRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticParameters diagnosticParameters) + { + 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendPath("/generateThreadDump", 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(diagnosticParameters); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Generate Thread Dump. + /// 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 App resource. + /// The name of the Deployment resource. + /// Parameters for the diagnostic operation. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task GenerateThreadDumpAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); + + using var message = CreateGenerateThreadDumpRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Generate Thread Dump. + /// 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 App resource. + /// The name of the Deployment resource. + /// Parameters for the diagnostic operation. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GenerateThreadDump(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); + + using var message = CreateGenerateThreadDumpRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateStartJFRRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticParameters diagnosticParameters) + { + 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("/apps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendPath("/startJFR", 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(diagnosticParameters); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Start JFR. + /// 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 App resource. + /// The name of the Deployment resource. + /// Parameters for the diagnostic operation. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task StartJFRAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); + + using var message = CreateStartJFRRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Start JFR. + /// 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 App resource. + /// The name of the Deployment resource. + /// Parameters for the diagnostic operation. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response StartJFR(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); + + using var message = CreateStartJFRRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters); + _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 appName, IEnumerable version) + { + 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 an App. + /// 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 App resource. + /// Version of the deployments to be listed. + /// 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 appName, IEnumerable version = null, 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(appName, nameof(appName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, appName, version); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.DeploymentResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.DeploymentResourceCollection.DeserializeDeploymentResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Handles requests to list all resources in an App. + /// 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 App resource. + /// Version of the deployments to be listed. + /// 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 appName, IEnumerable version = null, 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(appName, nameof(appName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, appName, version); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.DeploymentResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.DeploymentResourceCollection.DeserializeDeploymentResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListForClusterNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, IEnumerable version) + { + 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 deployments for a certain 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. + /// Version of the deployments to be listed. + /// 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, IEnumerable version = null, 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, version); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.DeploymentResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.DeploymentResourceCollection.DeserializeDeploymentResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List deployments for a certain 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. + /// Version of the deployments to be listed. + /// 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, IEnumerable version = null, 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, version); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.DeploymentResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.DeploymentResourceCollection.DeserializeDeploymentResourceCollection(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 new file mode 100644 index 0000000000000..86c889776c067 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/GatewayCustomDomainsRestOperations.cs @@ -0,0 +1,473 @@ +// 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 GatewayCustomDomainsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of GatewayCustomDomainsRestOperations. + /// 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 GatewayCustomDomainsRestOperations(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 ?? "2022-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, string domainName) + { + 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("/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendPath("/domains/", false); + uri.AppendPath(domainName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the Spring Cloud Gateway custom domain. + /// 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 name of the Spring Cloud Gateway custom domain. + /// 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 gatewayName, string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, gatewayName, domainName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GatewayCustomDomainResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = GatewayCustomDomainResourceData.DeserializeGatewayCustomDomainResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((GatewayCustomDomainResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the Spring Cloud Gateway custom domain. + /// 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 name of the Spring Cloud Gateway custom domain. + /// 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 gatewayName, string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, gatewayName, domainName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GatewayCustomDomainResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = GatewayCustomDomainResourceData.DeserializeGatewayCustomDomainResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((GatewayCustomDomainResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, string domainName, GatewayCustomDomainResourceData 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("/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendPath("/domains/", false); + uri.AppendPath(domainName, 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 Spring Cloud Gateway custom domain. + /// 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 name of the Spring Cloud Gateway custom domain. + /// The gateway custom domain resource 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 gatewayName, string domainName, GatewayCustomDomainResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, gatewayName, domainName, 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 Spring Cloud Gateway custom domain. + /// 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 name of the Spring Cloud Gateway custom domain. + /// The gateway custom domain resource 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 gatewayName, string domainName, GatewayCustomDomainResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, gatewayName, domainName, 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 gatewayName, string domainName) + { + 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("/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendPath("/domains/", false); + uri.AppendPath(domainName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete the Spring Cloud Gateway custom domain. + /// 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 name of the Spring Cloud Gateway custom domain. + /// 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 gatewayName, string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, gatewayName, domainName); + 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 Spring Cloud Gateway custom domain. + /// 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 name of the Spring Cloud Gateway custom domain. + /// 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 gatewayName, string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, gatewayName, domainName); + _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 CreateListRequest(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName) + { + 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("/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendPath("/domains", 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 Spring Cloud Gateway custom domains. + /// 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> ListAsync(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 = CreateListRequest(subscriptionId, resourceGroupName, serviceName, gatewayName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.GatewayCustomDomainResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.GatewayCustomDomainResourceCollection.DeserializeGatewayCustomDomainResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Handle requests to list all Spring Cloud Gateway custom domains. + /// 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 List(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 = CreateListRequest(subscriptionId, resourceGroupName, serviceName, gatewayName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.GatewayCustomDomainResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.GatewayCustomDomainResourceCollection.DeserializeGatewayCustomDomainResourceCollection(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 gatewayName) + { + 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 Spring Cloud Gateway custom domains. + /// 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 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> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, 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(gatewayName, nameof(gatewayName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, gatewayName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.GatewayCustomDomainResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.GatewayCustomDomainResourceCollection.DeserializeGatewayCustomDomainResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Handle requests to list all Spring Cloud Gateway custom domains. + /// 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 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 ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, 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(gatewayName, nameof(gatewayName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, gatewayName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.GatewayCustomDomainResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.GatewayCustomDomainResourceCollection.DeserializeGatewayCustomDomainResourceCollection(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/GatewayRouteConfigsRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/GatewayRouteConfigsRestOperations.cs new file mode 100644 index 0000000000000..da2a8e8fcd623 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/GatewayRouteConfigsRestOperations.cs @@ -0,0 +1,473 @@ +// 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 GatewayRouteConfigsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of GatewayRouteConfigsRestOperations. + /// 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 GatewayRouteConfigsRestOperations(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 ?? "2022-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, string routeConfigName) + { + 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("/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendPath("/routeConfigs/", false); + uri.AppendPath(routeConfigName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the Spring Cloud Gateway route configs. + /// 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 name of the Spring Cloud Gateway route config. + /// 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 gatewayName, string routeConfigName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNullOrEmpty(routeConfigName, nameof(routeConfigName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, gatewayName, routeConfigName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GatewayRouteConfigResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = GatewayRouteConfigResourceData.DeserializeGatewayRouteConfigResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((GatewayRouteConfigResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the Spring Cloud Gateway route configs. + /// 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 name of the Spring Cloud Gateway route config. + /// 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 gatewayName, string routeConfigName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNullOrEmpty(routeConfigName, nameof(routeConfigName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, gatewayName, routeConfigName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GatewayRouteConfigResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = GatewayRouteConfigResourceData.DeserializeGatewayRouteConfigResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((GatewayRouteConfigResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, string routeConfigName, GatewayRouteConfigResourceData 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("/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendPath("/routeConfigs/", false); + uri.AppendPath(routeConfigName, 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 Spring Cloud Gateway route configs or update the existing Spring Cloud Gateway route configs. + /// 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 name of the Spring Cloud Gateway route config. + /// The Spring Cloud Gateway route config 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 gatewayName, string routeConfigName, GatewayRouteConfigResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNullOrEmpty(routeConfigName, nameof(routeConfigName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, gatewayName, routeConfigName, 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 Spring Cloud Gateway route configs or update the existing Spring Cloud Gateway route configs. + /// 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 name of the Spring Cloud Gateway route config. + /// The Spring Cloud Gateway route config 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 gatewayName, string routeConfigName, GatewayRouteConfigResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNullOrEmpty(routeConfigName, nameof(routeConfigName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, gatewayName, routeConfigName, 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 gatewayName, string routeConfigName) + { + 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("/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendPath("/routeConfigs/", false); + uri.AppendPath(routeConfigName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete the Spring Cloud Gateway route config. + /// 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 name of the Spring Cloud Gateway route config. + /// 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 gatewayName, string routeConfigName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNullOrEmpty(routeConfigName, nameof(routeConfigName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, gatewayName, routeConfigName); + 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 Spring Cloud Gateway route config. + /// 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 name of the Spring Cloud Gateway route config. + /// 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 gatewayName, string routeConfigName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNullOrEmpty(routeConfigName, nameof(routeConfigName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, gatewayName, routeConfigName); + _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 CreateListRequest(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName) + { + 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("/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendPath("/routeConfigs", 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 Spring Cloud Gateway route configs. + /// 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> ListAsync(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 = CreateListRequest(subscriptionId, resourceGroupName, serviceName, gatewayName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.GatewayRouteConfigResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.GatewayRouteConfigResourceCollection.DeserializeGatewayRouteConfigResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Handle requests to list all Spring Cloud Gateway route configs. + /// 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 List(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 = CreateListRequest(subscriptionId, resourceGroupName, serviceName, gatewayName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.GatewayRouteConfigResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.GatewayRouteConfigResourceCollection.DeserializeGatewayRouteConfigResourceCollection(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 gatewayName) + { + 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 Spring Cloud Gateway route configs. + /// 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 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> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, 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(gatewayName, nameof(gatewayName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, gatewayName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.GatewayRouteConfigResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.GatewayRouteConfigResourceCollection.DeserializeGatewayRouteConfigResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Handle requests to list all Spring Cloud Gateway route configs. + /// 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 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 ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, 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(gatewayName, nameof(gatewayName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, gatewayName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.GatewayRouteConfigResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.GatewayRouteConfigResourceCollection.DeserializeGatewayRouteConfigResourceCollection(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/GatewaysRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/GatewaysRestOperations.cs new file mode 100644 index 0000000000000..611535d5ad400 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/GatewaysRestOperations.cs @@ -0,0 +1,538 @@ +// 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 GatewaysRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of GatewaysRestOperations. + /// 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 GatewaysRestOperations(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 ?? "2022-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName) + { + 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("/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the Spring Cloud Gateway 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 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> GetAsync(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 = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, gatewayName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GatewayResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = GatewayResourceData.DeserializeGatewayResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((GatewayResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the Spring Cloud Gateway 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 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 Get(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 = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, gatewayName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GatewayResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = GatewayResourceData.DeserializeGatewayResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((GatewayResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, GatewayResourceData 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("/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(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create the default Spring Cloud Gateway or update the existing 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 gateway 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 gatewayName, GatewayResourceData data, 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(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, gatewayName, 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 Spring Cloud Gateway or update the existing 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 gateway 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 gatewayName, GatewayResourceData data, 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(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, gatewayName, 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 gatewayName) + { + 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("/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Disable the default 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 DeleteAsync(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 = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, gatewayName); + 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 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 Delete(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 = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, gatewayName); + _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 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("/gateways", 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.GatewayResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.GatewayResourceCollection.DeserializeGatewayResourceCollection(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.GatewayResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.GatewayResourceCollection.DeserializeGatewayResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateValidateDomainRequest(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, CustomDomainValidatePayload validatePayload) + { + 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("/validateDomain", 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(validatePayload); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Check the domains are valid as well as not in use. + /// 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. + /// Custom domain payload 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> ValidateDomainAsync(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, CustomDomainValidatePayload validatePayload, 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(validatePayload, nameof(validatePayload)); + + using var message = CreateValidateDomainRequest(subscriptionId, resourceGroupName, serviceName, gatewayName, validatePayload); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CustomDomainValidateResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CustomDomainValidateResult.DeserializeCustomDomainValidateResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Check the domains are valid as well as not in use. + /// 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. + /// Custom domain payload 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 ValidateDomain(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, CustomDomainValidatePayload validatePayload, 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(validatePayload, nameof(validatePayload)); + + using var message = CreateValidateDomainRequest(subscriptionId, resourceGroupName, serviceName, gatewayName, validatePayload); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CustomDomainValidateResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CustomDomainValidateResult.DeserializeCustomDomainValidateResult(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) + { + 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.GatewayResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.GatewayResourceCollection.DeserializeGatewayResourceCollection(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.GatewayResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.GatewayResourceCollection.DeserializeGatewayResourceCollection(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/MonitoringSettingsRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/MonitoringSettingsRestOperations.cs new file mode 100644 index 0000000000000..456e7bbba8863 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/MonitoringSettingsRestOperations.cs @@ -0,0 +1,280 @@ +// 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; + +namespace Azure.ResourceManager.AppPlatform +{ + internal partial class MonitoringSettingsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of MonitoringSettingsRestOperations. + /// 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 MonitoringSettingsRestOperations(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 ?? "2022-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(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("/monitoringSettings/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the Monitoring Setting 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 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, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MonitoringSettingResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MonitoringSettingResourceData.DeserializeMonitoringSettingResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MonitoringSettingResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the Monitoring Setting 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 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, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MonitoringSettingResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MonitoringSettingResourceData.DeserializeMonitoringSettingResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MonitoringSettingResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdatePutRequest(string subscriptionId, string resourceGroupName, string serviceName, MonitoringSettingResourceData 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("/monitoringSettings/default", 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(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update the Monitoring Setting. + /// 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. + /// 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 UpdatePutAsync(string subscriptionId, string resourceGroupName, string serviceName, MonitoringSettingResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdatePutRequest(subscriptionId, resourceGroupName, serviceName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update the Monitoring Setting. + /// 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. + /// 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 UpdatePut(string subscriptionId, string resourceGroupName, string serviceName, MonitoringSettingResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdatePutRequest(subscriptionId, resourceGroupName, serviceName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdatePatchRequest(string subscriptionId, string resourceGroupName, string serviceName, MonitoringSettingResourceData data) + { + 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("/monitoringSettings/default", 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(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update the Monitoring Setting. + /// 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. + /// 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 UpdatePatchAsync(string subscriptionId, string resourceGroupName, string serviceName, MonitoringSettingResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdatePatchRequest(subscriptionId, resourceGroupName, serviceName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update the Monitoring Setting. + /// 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. + /// 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 UpdatePatch(string subscriptionId, string resourceGroupName, string serviceName, MonitoringSettingResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdatePatchRequest(subscriptionId, resourceGroupName, serviceName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return 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 new file mode 100644 index 0000000000000..d5617d84ddce8 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/RuntimeVersionsRestOperations.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using 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 RuntimeVersionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of RuntimeVersionsRestOperations. + /// 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 RuntimeVersionsRestOperations(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 ?? "2022-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRuntimeVersionsRequest() + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/providers/Microsoft.AppPlatform/runtimeVersions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all of the available runtime versions supported by Microsoft.AppPlatform provider. + /// The cancellation token to use. + public async Task> ListRuntimeVersionsAsync(CancellationToken cancellationToken = default) + { + using var message = CreateListRuntimeVersionsRequest(); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AvailableRuntimeVersions value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AvailableRuntimeVersions.DeserializeAvailableRuntimeVersions(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all of the available runtime versions supported by Microsoft.AppPlatform provider. + /// The cancellation token to use. + public Response ListRuntimeVersions(CancellationToken cancellationToken = default) + { + using var message = CreateListRuntimeVersionsRequest(); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AvailableRuntimeVersions value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AvailableRuntimeVersions.DeserializeAvailableRuntimeVersions(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/ServiceRegistriesRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ServiceRegistriesRestOperations.cs new file mode 100644 index 0000000000000..e8be40aaed789 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ServiceRegistriesRestOperations.cs @@ -0,0 +1,437 @@ +// 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 ServiceRegistriesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ServiceRegistriesRestOperations. + /// 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 ServiceRegistriesRestOperations(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 ?? "2022-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string serviceRegistryName) + { + 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("/serviceRegistries/", false); + uri.AppendPath(serviceRegistryName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the Service Registry 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 Service 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 serviceRegistryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(serviceRegistryName, nameof(serviceRegistryName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, serviceRegistryName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ServiceRegistryResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ServiceRegistryResourceData.DeserializeServiceRegistryResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ServiceRegistryResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the Service Registry 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 Service 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 serviceRegistryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(serviceRegistryName, nameof(serviceRegistryName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, serviceRegistryName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ServiceRegistryResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ServiceRegistryResourceData.DeserializeServiceRegistryResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ServiceRegistryResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string serviceRegistryName) + { + 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("/serviceRegistries/", false); + uri.AppendPath(serviceRegistryName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Create the default Service Registry or update the existing Service Registry. + /// 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 Service Registry. + /// 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 serviceRegistryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(serviceRegistryName, nameof(serviceRegistryName)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, serviceRegistryName); + 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 Service Registry or update the existing Service Registry. + /// 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 Service Registry. + /// 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 serviceRegistryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(serviceRegistryName, nameof(serviceRegistryName)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, serviceRegistryName); + _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 serviceRegistryName) + { + 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("/serviceRegistries/", false); + uri.AppendPath(serviceRegistryName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Disable the default Service Registry. + /// 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 Service Registry. + /// 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 serviceRegistryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(serviceRegistryName, nameof(serviceRegistryName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, serviceRegistryName); + 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 Service Registry. + /// 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 Service Registry. + /// 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 serviceRegistryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(serviceRegistryName, nameof(serviceRegistryName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, serviceRegistryName); + _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 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("/serviceRegistries", 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.ServiceRegistryResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.ServiceRegistryResourceCollection.DeserializeServiceRegistryResourceCollection(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.ServiceRegistryResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.ServiceRegistryResourceCollection.DeserializeServiceRegistryResourceCollection(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) + { + 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.ServiceRegistryResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.ServiceRegistryResourceCollection.DeserializeServiceRegistryResourceCollection(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.ServiceRegistryResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.ServiceRegistryResourceCollection.DeserializeServiceRegistryResourceCollection(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/ServicesRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ServicesRestOperations.cs new file mode 100644 index 0000000000000..3d49cb558f31a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ServicesRestOperations.cs @@ -0,0 +1,1163 @@ +// 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 ServicesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ServicesRestOperations. + /// 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 ServicesRestOperations(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 ?? "2022-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(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.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Service 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 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, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ServiceResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ServiceResourceData.DeserializeServiceResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ServiceResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Service 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 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, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ServiceResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ServiceResourceData.DeserializeServiceResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ServiceResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, ServiceResourceData 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.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 new Service or update an exiting 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. + /// 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, ServiceResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a new Service or update an exiting 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. + /// 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, ServiceResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName) + { + 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.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Operation to delete 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 DeleteAsync(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 = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName); + 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); + } + } + + /// Operation to delete 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 Delete(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 = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName); + _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 CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, ServiceResourceData data) + { + 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.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; + } + + /// Operation to update an exiting 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. + /// 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 UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, ServiceResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, data); + 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 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. + /// 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 Update(string subscriptionId, string resourceGroupName, string serviceName, ServiceResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListTestKeysRequest(string subscriptionId, string resourceGroupName, string serviceName) + { + 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("/listTestKeys", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List test keys for 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> ListTestKeysAsync(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 = CreateListTestKeysRequest(subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + TestKeys value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = TestKeys.DeserializeTestKeys(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List test keys for 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 ListTestKeys(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 = CreateListTestKeysRequest(subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + TestKeys value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = TestKeys.DeserializeTestKeys(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateRegenerateTestKeyRequest(string subscriptionId, string resourceGroupName, string serviceName, RegenerateTestKeyRequestPayload regenerateTestKeyRequest) + { + 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("/regenerateTestKey", 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(regenerateTestKeyRequest); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Regenerate a test key for 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. + /// Parameters for the operation. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> RegenerateTestKeyAsync(string subscriptionId, string resourceGroupName, string serviceName, RegenerateTestKeyRequestPayload regenerateTestKeyRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNull(regenerateTestKeyRequest, nameof(regenerateTestKeyRequest)); + + using var message = CreateRegenerateTestKeyRequest(subscriptionId, resourceGroupName, serviceName, regenerateTestKeyRequest); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + TestKeys value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = TestKeys.DeserializeTestKeys(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Regenerate a test key for 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. + /// Parameters for the operation. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response RegenerateTestKey(string subscriptionId, string resourceGroupName, string serviceName, RegenerateTestKeyRequestPayload regenerateTestKeyRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNull(regenerateTestKeyRequest, nameof(regenerateTestKeyRequest)); + + using var message = CreateRegenerateTestKeyRequest(subscriptionId, resourceGroupName, serviceName, regenerateTestKeyRequest); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + TestKeys value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = TestKeys.DeserializeTestKeys(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDisableTestEndpointRequest(string subscriptionId, string resourceGroupName, string serviceName) + { + 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("/disableTestEndpoint", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Disable test endpoint functionality for 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 DisableTestEndpointAsync(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 = CreateDisableTestEndpointRequest(subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Disable test endpoint functionality for 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 DisableTestEndpoint(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 = CreateDisableTestEndpointRequest(subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateEnableTestEndpointRequest(string subscriptionId, string resourceGroupName, string serviceName) + { + 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("/enableTestEndpoint", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Enable test endpoint functionality for 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> EnableTestEndpointAsync(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 = CreateEnableTestEndpointRequest(subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + TestKeys value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = TestKeys.DeserializeTestKeys(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Enable test endpoint functionality for 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 EnableTestEndpoint(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 = CreateEnableTestEndpointRequest(subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + TestKeys value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = TestKeys.DeserializeTestKeys(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGroupName, string serviceName) + { + 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("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Stop 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 StopAsync(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 = CreateStopRequest(subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Stop 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 Stop(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 = CreateStopRequest(subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGroupName, string serviceName) + { + 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("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Start 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 StartAsync(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 = CreateStartRequest(subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Start 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 Start(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 = CreateStartRequest(subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, AzureLocation location, NameAvailabilityContent content) + { + 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("/providers/Microsoft.AppPlatform/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/checkNameAvailability", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Checks that the resource name is valid and is not already in use. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// the region. + /// Parameters supplied to the operation. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> CheckNameAvailabilityAsync(string subscriptionId, AzureLocation location, NameAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateCheckNameAvailabilityRequest(subscriptionId, location, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NameAvailability value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NameAvailability.DeserializeNameAvailability(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Checks that the resource name is valid and is not already in use. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// the region. + /// Parameters supplied to the operation. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response CheckNameAvailability(string subscriptionId, AzureLocation location, NameAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateCheckNameAvailabilityRequest(subscriptionId, location, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NameAvailability value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NameAvailability.DeserializeNameAvailability(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + 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("/providers/Microsoft.AppPlatform/Spring", 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 subscription. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ServiceResourceList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ServiceResourceList.DeserializeServiceResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Handles requests to list all resources in a subscription. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ServiceResourceList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ServiceResourceList.DeserializeServiceResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName) + { + 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.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 resource group. + /// 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 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, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ServiceResourceList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ServiceResourceList.DeserializeServiceResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Handles requests to list all resources in a resource group. + /// 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 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, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ServiceResourceList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ServiceResourceList.DeserializeServiceResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + 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 subscription. + /// 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 cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ServiceResourceList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ServiceResourceList.DeserializeServiceResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Handles requests to list all resources in a subscription. + /// 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 cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ServiceResourceList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ServiceResourceList.DeserializeServiceResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + 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 resource group. + /// 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 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, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ServiceResourceList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ServiceResourceList.DeserializeServiceResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Handles requests to list all resources in a resource group. + /// 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 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, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ServiceResourceList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ServiceResourceList.DeserializeServiceResourceList(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/SkusRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/SkusRestOperations.cs new file mode 100644 index 0000000000000..9e80fe0cc9106 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/SkusRestOperations.cs @@ -0,0 +1,175 @@ +// 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 SkusRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SkusRestOperations. + /// 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 SkusRestOperations(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 ?? "2022-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRequest(string subscriptionId) + { + 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("/providers/Microsoft.AppPlatform/skus", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all of the available skus of the Microsoft.AppPlatform provider. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ResourceSkuCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ResourceSkuCollection.DeserializeResourceSkuCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all of the available skus of the Microsoft.AppPlatform provider. + /// Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ResourceSkuCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ResourceSkuCollection.DeserializeResourceSkuCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId) + { + 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; + } + + /// Lists all of the available skus of the Microsoft.AppPlatform provider. + /// 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 cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ResourceSkuCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ResourceSkuCollection.DeserializeResourceSkuCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all of the available skus of the Microsoft.AppPlatform provider. + /// 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 cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ResourceSkuCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ResourceSkuCollection.DeserializeResourceSkuCollection(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/StoragesRestOperations.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/StoragesRestOperations.cs new file mode 100644 index 0000000000000..96cc3bff06837 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/StoragesRestOperations.cs @@ -0,0 +1,447 @@ +// 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 StoragesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of StoragesRestOperations. + /// 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 StoragesRestOperations(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 ?? "2022-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string storageName) + { + 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("/storages/", false); + uri.AppendPath(storageName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the storage 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 storage resource. + /// 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 storageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(storageName, nameof(storageName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, storageName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StorageResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StorageResourceData.DeserializeStorageResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((StorageResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the storage 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 storage resource. + /// 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 storageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(storageName, nameof(storageName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, storageName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StorageResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StorageResourceData.DeserializeStorageResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((StorageResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string storageName, StorageResourceData 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("/storages/", false); + uri.AppendPath(storageName, 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 storage 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 storage resource. + /// 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 storageName, StorageResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(storageName, nameof(storageName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, storageName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update storage 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 storage resource. + /// 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 storageName, StorageResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(storageName, nameof(storageName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, storageName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string storageName) + { + 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("/storages/", false); + uri.AppendPath(storageName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete the storage 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 storage resource. + /// 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 storageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(storageName, nameof(storageName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, storageName); + 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 storage 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 storage resource. + /// 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 storageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(storageName, nameof(storageName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, storageName); + _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 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("/storages", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all the storages of one Azure Spring Cloud instance. + /// 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.StorageResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.StorageResourceCollection.DeserializeStorageResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all the storages of one Azure Spring Cloud instance. + /// 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.StorageResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.StorageResourceCollection.DeserializeStorageResourceCollection(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) + { + 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 all the storages of one Azure Spring Cloud instance. + /// 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.StorageResourceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.StorageResourceCollection.DeserializeStorageResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all the storages of one Azure Spring Cloud instance. + /// 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.StorageResourceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.StorageResourceCollection.DeserializeStorageResourceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceRegistryResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceRegistryResource.cs new file mode 100644 index 0000000000000..051ea0ae706fd --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceRegistryResource.cs @@ -0,0 +1,241 @@ +// 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 ServiceRegistryResource 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 GetServiceRegistryResource method. + /// Otherwise you can get one from its parent resource using the GetServiceRegistryResource method. + /// + public partial class ServiceRegistryResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string serviceRegistryName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries/{serviceRegistryName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _serviceRegistryResourceServiceRegistriesClientDiagnostics; + private readonly ServiceRegistriesRestOperations _serviceRegistryResourceServiceRegistriesRestClient; + private readonly ServiceRegistryResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected ServiceRegistryResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ServiceRegistryResource(ArmClient client, ServiceRegistryResourceData 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 ServiceRegistryResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _serviceRegistryResourceServiceRegistriesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string serviceRegistryResourceServiceRegistriesApiVersion); + _serviceRegistryResourceServiceRegistriesRestClient = new ServiceRegistriesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceRegistryResourceServiceRegistriesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/serviceRegistries"; + + /// 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 ServiceRegistryResourceData 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 Service Registry and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries/{serviceRegistryName} + /// Operation Id: ServiceRegistries_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceRegistryResourceServiceRegistriesClientDiagnostics.CreateScope("ServiceRegistryResource.Get"); + scope.Start(); + try + { + var response = await _serviceRegistryResourceServiceRegistriesRestClient.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 ServiceRegistryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Service Registry and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries/{serviceRegistryName} + /// Operation Id: ServiceRegistries_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _serviceRegistryResourceServiceRegistriesClientDiagnostics.CreateScope("ServiceRegistryResource.Get"); + scope.Start(); + try + { + var response = _serviceRegistryResourceServiceRegistriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceRegistryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Disable the default Service Registry. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries/{serviceRegistryName} + /// Operation Id: ServiceRegistries_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 = _serviceRegistryResourceServiceRegistriesClientDiagnostics.CreateScope("ServiceRegistryResource.Delete"); + scope.Start(); + try + { + var response = await _serviceRegistryResourceServiceRegistriesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_serviceRegistryResourceServiceRegistriesClientDiagnostics, Pipeline, _serviceRegistryResourceServiceRegistriesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Disable the default Service Registry. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries/{serviceRegistryName} + /// Operation Id: ServiceRegistries_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 = _serviceRegistryResourceServiceRegistriesClientDiagnostics.CreateScope("ServiceRegistryResource.Delete"); + scope.Start(); + try + { + var response = _serviceRegistryResourceServiceRegistriesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_serviceRegistryResourceServiceRegistriesClientDiagnostics, Pipeline, _serviceRegistryResourceServiceRegistriesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create the default Service Registry or update the existing Service Registry. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries/{serviceRegistryName} + /// Operation Id: ServiceRegistries_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 cancellation token to use. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _serviceRegistryResourceServiceRegistriesClientDiagnostics.CreateScope("ServiceRegistryResource.Update"); + scope.Start(); + try + { + var response = await _serviceRegistryResourceServiceRegistriesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new ServiceRegistryResourceOperationSource(Client), _serviceRegistryResourceServiceRegistriesClientDiagnostics, Pipeline, _serviceRegistryResourceServiceRegistriesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create the default Service Registry or update the existing Service Registry. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries/{serviceRegistryName} + /// Operation Id: ServiceRegistries_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 cancellation token to use. + public virtual ArmOperation Update(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _serviceRegistryResourceServiceRegistriesClientDiagnostics.CreateScope("ServiceRegistryResource.Update"); + scope.Start(); + try + { + var response = _serviceRegistryResourceServiceRegistriesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(new ServiceRegistryResourceOperationSource(Client), _serviceRegistryResourceServiceRegistriesClientDiagnostics, Pipeline, _serviceRegistryResourceServiceRegistriesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + 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/ServiceRegistryResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceRegistryResourceCollection.cs new file mode 100644 index 0000000000000..ee694edcbf789 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceRegistryResourceCollection.cs @@ -0,0 +1,329 @@ +// 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.Linq; +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 GetServiceRegistryResources method from an instance of . + /// + public partial class ServiceRegistryResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _serviceRegistryResourceServiceRegistriesClientDiagnostics; + private readonly ServiceRegistriesRestOperations _serviceRegistryResourceServiceRegistriesRestClient; + + /// Initializes a new instance of the class for mocking. + protected ServiceRegistryResourceCollection() + { + } + + /// 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 ServiceRegistryResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _serviceRegistryResourceServiceRegistriesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ServiceRegistryResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ServiceRegistryResource.ResourceType, out string serviceRegistryResourceServiceRegistriesApiVersion); + _serviceRegistryResourceServiceRegistriesRestClient = new ServiceRegistriesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceRegistryResourceServiceRegistriesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ServiceResource.ResourceType), nameof(id)); + } + + /// + /// Create the default Service Registry or update the existing Service Registry. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries/{serviceRegistryName} + /// Operation Id: ServiceRegistries_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 Service Registry. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string serviceRegistryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(serviceRegistryName, nameof(serviceRegistryName)); + + using var scope = _serviceRegistryResourceServiceRegistriesClientDiagnostics.CreateScope("ServiceRegistryResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _serviceRegistryResourceServiceRegistriesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serviceRegistryName, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new ServiceRegistryResourceOperationSource(Client), _serviceRegistryResourceServiceRegistriesClientDiagnostics, Pipeline, _serviceRegistryResourceServiceRegistriesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serviceRegistryName).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create the default Service Registry or update the existing Service Registry. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries/{serviceRegistryName} + /// Operation Id: ServiceRegistries_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 Service Registry. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string serviceRegistryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(serviceRegistryName, nameof(serviceRegistryName)); + + using var scope = _serviceRegistryResourceServiceRegistriesClientDiagnostics.CreateScope("ServiceRegistryResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _serviceRegistryResourceServiceRegistriesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serviceRegistryName, cancellationToken); + var operation = new AppPlatformArmOperation(new ServiceRegistryResourceOperationSource(Client), _serviceRegistryResourceServiceRegistriesClientDiagnostics, Pipeline, _serviceRegistryResourceServiceRegistriesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serviceRegistryName).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Service Registry and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries/{serviceRegistryName} + /// Operation Id: ServiceRegistries_Get + /// + /// The name of Service 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 serviceRegistryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(serviceRegistryName, nameof(serviceRegistryName)); + + using var scope = _serviceRegistryResourceServiceRegistriesClientDiagnostics.CreateScope("ServiceRegistryResourceCollection.Get"); + scope.Start(); + try + { + var response = await _serviceRegistryResourceServiceRegistriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serviceRegistryName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceRegistryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Service Registry and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries/{serviceRegistryName} + /// Operation Id: ServiceRegistries_Get + /// + /// The name of Service Registry. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string serviceRegistryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(serviceRegistryName, nameof(serviceRegistryName)); + + using var scope = _serviceRegistryResourceServiceRegistriesClientDiagnostics.CreateScope("ServiceRegistryResourceCollection.Get"); + scope.Start(); + try + { + var response = _serviceRegistryResourceServiceRegistriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serviceRegistryName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceRegistryResource(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}/serviceRegistries + /// Operation Id: ServiceRegistries_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) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _serviceRegistryResourceServiceRegistriesClientDiagnostics.CreateScope("ServiceRegistryResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _serviceRegistryResourceServiceRegistriesRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new ServiceRegistryResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _serviceRegistryResourceServiceRegistriesClientDiagnostics.CreateScope("ServiceRegistryResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _serviceRegistryResourceServiceRegistriesRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new ServiceRegistryResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Handles requests to list all resources in a Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries + /// Operation Id: ServiceRegistries_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) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _serviceRegistryResourceServiceRegistriesClientDiagnostics.CreateScope("ServiceRegistryResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _serviceRegistryResourceServiceRegistriesRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new ServiceRegistryResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _serviceRegistryResourceServiceRegistriesClientDiagnostics.CreateScope("ServiceRegistryResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _serviceRegistryResourceServiceRegistriesRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new ServiceRegistryResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries/{serviceRegistryName} + /// Operation Id: ServiceRegistries_Get + /// + /// The name of Service 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 serviceRegistryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(serviceRegistryName, nameof(serviceRegistryName)); + + using var scope = _serviceRegistryResourceServiceRegistriesClientDiagnostics.CreateScope("ServiceRegistryResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _serviceRegistryResourceServiceRegistriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serviceRegistryName, 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}/serviceRegistries/{serviceRegistryName} + /// Operation Id: ServiceRegistries_Get + /// + /// The name of Service Registry. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string serviceRegistryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(serviceRegistryName, nameof(serviceRegistryName)); + + using var scope = _serviceRegistryResourceServiceRegistriesClientDiagnostics.CreateScope("ServiceRegistryResourceCollection.Exists"); + scope.Start(); + try + { + var response = _serviceRegistryResourceServiceRegistriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serviceRegistryName, 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/ServiceRegistryResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceRegistryResourceData.cs new file mode 100644 index 0000000000000..c9acc2229a441 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceRegistryResourceData.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class representing the ServiceRegistryResource data model. + public partial class ServiceRegistryResourceData : ResourceData + { + /// Initializes a new instance of ServiceRegistryResourceData. + public ServiceRegistryResourceData() + { + } + + /// Initializes a new instance of ServiceRegistryResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Service Registry properties payload. + internal ServiceRegistryResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ServiceRegistryProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// Service Registry properties payload. + public ServiceRegistryProperties Properties { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceResource.cs new file mode 100644 index 0000000000000..9ec1392572291 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceResource.cs @@ -0,0 +1,1189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.AppPlatform +{ + /// + /// A Class representing a ServiceResource 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 GetServiceResource method. + /// Otherwise you can get one from its parent resource using the GetServiceResource method. + /// + public partial class ServiceResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _serviceResourceServicesClientDiagnostics; + private readonly ServicesRestOperations _serviceResourceServicesRestClient; + private readonly ClientDiagnostics _configServerResourceConfigServersClientDiagnostics; + private readonly ConfigServersRestOperations _configServerResourceConfigServersRestClient; + private readonly ClientDiagnostics _deploymentResourceDeploymentsClientDiagnostics; + private readonly DeploymentsRestOperations _deploymentResourceDeploymentsRestClient; + private readonly ServiceResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected ServiceResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ServiceResource(ArmClient client, ServiceResourceData 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 ServiceResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _serviceResourceServicesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string serviceResourceServicesApiVersion); + _serviceResourceServicesRestClient = new ServicesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceResourceServicesApiVersion); + _configServerResourceConfigServersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ConfigServerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ConfigServerResource.ResourceType, out string configServerResourceConfigServersApiVersion); + _configServerResourceConfigServersRestClient = new ConfigServersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, configServerResourceConfigServersApiVersion); + _deploymentResourceDeploymentsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", DeploymentResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DeploymentResource.ResourceType, out string deploymentResourceDeploymentsApiVersion); + _deploymentResourceDeploymentsRestClient = new DeploymentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, deploymentResourceDeploymentsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring"; + + /// 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 ServiceResourceData 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 an object representing a ConfigServerResource along with the instance operations that can be performed on it in the ServiceResource. + /// Returns a object. + public virtual ConfigServerResource GetConfigServerResource() + { + return new ConfigServerResource(Client, new ResourceIdentifier(Id.ToString() + "/configServers/default")); + } + + /// Gets a collection of ConfigurationServiceResources in the ServiceResource. + /// An object representing collection of ConfigurationServiceResources and their operations over a ConfigurationServiceResource. + public virtual ConfigurationServiceResourceCollection GetConfigurationServiceResources() + { + return GetCachedClient(Client => new ConfigurationServiceResourceCollection(Client, Id)); + } + + /// + /// Get the Application Configuration Service and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices/{configurationServiceName} + /// Operation Id: ConfigurationServices_Get + /// + /// The name of Application Configuration Service. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetConfigurationServiceResourceAsync(string configurationServiceName, CancellationToken cancellationToken = default) + { + return await GetConfigurationServiceResources().GetAsync(configurationServiceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the Application Configuration Service and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices/{configurationServiceName} + /// Operation Id: ConfigurationServices_Get + /// + /// The name of Application Configuration Service. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetConfigurationServiceResource(string configurationServiceName, CancellationToken cancellationToken = default) + { + return GetConfigurationServiceResources().Get(configurationServiceName, cancellationToken); + } + + /// Gets a collection of ServiceRegistryResources in the ServiceResource. + /// An object representing collection of ServiceRegistryResources and their operations over a ServiceRegistryResource. + public virtual ServiceRegistryResourceCollection GetServiceRegistryResources() + { + return GetCachedClient(Client => new ServiceRegistryResourceCollection(Client, Id)); + } + + /// + /// Get the Service Registry and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries/{serviceRegistryName} + /// Operation Id: ServiceRegistries_Get + /// + /// The name of Service Registry. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetServiceRegistryResourceAsync(string serviceRegistryName, CancellationToken cancellationToken = default) + { + return await GetServiceRegistryResources().GetAsync(serviceRegistryName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the Service Registry and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries/{serviceRegistryName} + /// Operation Id: ServiceRegistries_Get + /// + /// The name of Service Registry. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetServiceRegistryResource(string serviceRegistryName, CancellationToken cancellationToken = default) + { + return GetServiceRegistryResources().Get(serviceRegistryName, cancellationToken); + } + + /// Gets a collection of BuildServiceResources in the ServiceResource. + /// An object representing collection of BuildServiceResources and their operations over a BuildServiceResource. + public virtual BuildServiceCollection GetBuildServices() + { + return GetCachedClient(Client => new BuildServiceCollection(Client, Id)); + } + + /// + /// Get a build service resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName} + /// Operation Id: BuildService_GetBuildService + /// + /// The name of the build service resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetBuildServiceAsync(string buildServiceName, CancellationToken cancellationToken = default) + { + return await GetBuildServices().GetAsync(buildServiceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a build service resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName} + /// Operation Id: BuildService_GetBuildService + /// + /// The name of the build service resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetBuildService(string buildServiceName, CancellationToken cancellationToken = default) + { + return GetBuildServices().Get(buildServiceName, cancellationToken); + } + + /// Gets an object representing a MonitoringSettingResource along with the instance operations that can be performed on it in the ServiceResource. + /// Returns a object. + public virtual MonitoringSettingResource GetMonitoringSettingResource() + { + return new MonitoringSettingResource(Client, new ResourceIdentifier(Id.ToString() + "/monitoringSettings/default")); + } + + /// Gets a collection of AppResources in the ServiceResource. + /// An object representing collection of AppResources and their operations over a AppResource. + public virtual AppResourceCollection GetAppResources() + { + return GetCachedClient(Client => new AppResourceCollection(Client, Id)); + } + + /// + /// Get an App and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName} + /// Operation Id: Apps_Get + /// + /// The name of the App resource. + /// Indicates whether sync status. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetAppResourceAsync(string appName, string syncStatus = null, CancellationToken cancellationToken = default) + { + return await GetAppResources().GetAsync(appName, syncStatus, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get an App and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName} + /// Operation Id: Apps_Get + /// + /// The name of the App resource. + /// Indicates whether sync status. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetAppResource(string appName, string syncStatus = null, CancellationToken cancellationToken = default) + { + return GetAppResources().Get(appName, syncStatus, cancellationToken); + } + + /// Gets a collection of StorageResources in the ServiceResource. + /// An object representing collection of StorageResources and their operations over a StorageResource. + public virtual StorageResourceCollection GetStorageResources() + { + return GetCachedClient(Client => new StorageResourceCollection(Client, Id)); + } + + /// + /// Get the storage resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName} + /// Operation Id: Storages_Get + /// + /// The name of the storage resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetStorageResourceAsync(string storageName, CancellationToken cancellationToken = default) + { + return await GetStorageResources().GetAsync(storageName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the storage resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName} + /// Operation Id: Storages_Get + /// + /// The name of the storage resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetStorageResource(string storageName, CancellationToken cancellationToken = default) + { + return GetStorageResources().Get(storageName, cancellationToken); + } + + /// Gets a collection of CertificateResources in the ServiceResource. + /// An object representing collection of CertificateResources and their operations over a CertificateResource. + public virtual CertificateResourceCollection GetCertificateResources() + { + return GetCachedClient(Client => new CertificateResourceCollection(Client, Id)); + } + + /// + /// Get the certificate resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName} + /// Operation Id: Certificates_Get + /// + /// The name of the certificate resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetCertificateResourceAsync(string certificateName, CancellationToken cancellationToken = default) + { + return await GetCertificateResources().GetAsync(certificateName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the certificate resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName} + /// Operation Id: Certificates_Get + /// + /// The name of the certificate resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetCertificateResource(string certificateName, CancellationToken cancellationToken = default) + { + return GetCertificateResources().Get(certificateName, cancellationToken); + } + + /// Gets a collection of GatewayResources in the ServiceResource. + /// An object representing collection of GatewayResources and their operations over a GatewayResource. + public virtual GatewayResourceCollection GetGatewayResources() + { + return GetCachedClient(Client => new GatewayResourceCollection(Client, Id)); + } + + /// + /// Get the Spring Cloud Gateway and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName} + /// Operation Id: Gateways_Get + /// + /// The name of Spring Cloud Gateway. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetGatewayResourceAsync(string gatewayName, CancellationToken cancellationToken = default) + { + return await GetGatewayResources().GetAsync(gatewayName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the Spring Cloud Gateway and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName} + /// Operation Id: Gateways_Get + /// + /// The name of Spring Cloud Gateway. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetGatewayResource(string gatewayName, CancellationToken cancellationToken = default) + { + return GetGatewayResources().Get(gatewayName, cancellationToken); + } + + /// Gets a collection of ApiPortalResources in the ServiceResource. + /// An object representing collection of ApiPortalResources and their operations over a ApiPortalResource. + public virtual ApiPortalResourceCollection GetApiPortalResources() + { + return GetCachedClient(Client => new ApiPortalResourceCollection(Client, Id)); + } + + /// + /// Get the API portal and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName} + /// Operation Id: ApiPortals_Get + /// + /// The name of API portal. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetApiPortalResourceAsync(string apiPortalName, CancellationToken cancellationToken = default) + { + return await GetApiPortalResources().GetAsync(apiPortalName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the API portal and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName} + /// Operation Id: ApiPortals_Get + /// + /// The name of API portal. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetApiPortalResource(string apiPortalName, CancellationToken cancellationToken = default) + { + return GetApiPortalResources().Get(apiPortalName, cancellationToken); + } + + /// + /// Get a Service and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName} + /// Operation Id: Services_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.Get"); + scope.Start(); + try + { + var response = await _serviceResourceServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Service and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName} + /// Operation Id: Services_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.Get"); + scope.Start(); + try + { + var response = _serviceResourceServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Operation to delete a Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName} + /// Operation Id: Services_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 = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.Delete"); + scope.Start(); + try + { + var response = await _serviceResourceServicesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_serviceResourceServicesClientDiagnostics, Pipeline, _serviceResourceServicesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Operation to delete a Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName} + /// Operation Id: Services_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 = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.Delete"); + scope.Start(); + try + { + var response = _serviceResourceServicesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_serviceResourceServicesClientDiagnostics, Pipeline, _serviceResourceServicesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Operation to update an exiting Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName} + /// Operation Id: Services_Update + /// + /// 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, ServiceResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.Update"); + scope.Start(); + try + { + var response = await _serviceResourceServicesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new ServiceResourceOperationSource(Client), _serviceResourceServicesClientDiagnostics, Pipeline, _serviceResourceServicesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Operation to update an exiting Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName} + /// Operation Id: Services_Update + /// + /// 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, ServiceResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.Update"); + scope.Start(); + try + { + var response = _serviceResourceServicesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new ServiceResourceOperationSource(Client), _serviceResourceServicesClientDiagnostics, Pipeline, _serviceResourceServicesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List test keys for a Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/listTestKeys + /// Operation Id: Services_ListTestKeys + /// + /// The cancellation token to use. + public virtual async Task> GetTestKeysAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.GetTestKeys"); + scope.Start(); + try + { + var response = await _serviceResourceServicesRestClient.ListTestKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List test keys for a Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/listTestKeys + /// Operation Id: Services_ListTestKeys + /// + /// The cancellation token to use. + public virtual Response GetTestKeys(CancellationToken cancellationToken = default) + { + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.GetTestKeys"); + scope.Start(); + try + { + var response = _serviceResourceServicesRestClient.ListTestKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Regenerate a test key for a Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/regenerateTestKey + /// Operation Id: Services_RegenerateTestKey + /// + /// Parameters for the operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> RegenerateTestKeyAsync(RegenerateTestKeyRequestPayload regenerateTestKeyRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(regenerateTestKeyRequest, nameof(regenerateTestKeyRequest)); + + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.RegenerateTestKey"); + scope.Start(); + try + { + var response = await _serviceResourceServicesRestClient.RegenerateTestKeyAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, regenerateTestKeyRequest, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Regenerate a test key for a Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/regenerateTestKey + /// Operation Id: Services_RegenerateTestKey + /// + /// Parameters for the operation. + /// The cancellation token to use. + /// is null. + public virtual Response RegenerateTestKey(RegenerateTestKeyRequestPayload regenerateTestKeyRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(regenerateTestKeyRequest, nameof(regenerateTestKeyRequest)); + + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.RegenerateTestKey"); + scope.Start(); + try + { + var response = _serviceResourceServicesRestClient.RegenerateTestKey(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, regenerateTestKeyRequest, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Disable test endpoint functionality for a Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/disableTestEndpoint + /// Operation Id: Services_DisableTestEndpoint + /// + /// The cancellation token to use. + public virtual async Task DisableTestEndpointAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.DisableTestEndpoint"); + scope.Start(); + try + { + var response = await _serviceResourceServicesRestClient.DisableTestEndpointAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Disable test endpoint functionality for a Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/disableTestEndpoint + /// Operation Id: Services_DisableTestEndpoint + /// + /// The cancellation token to use. + public virtual Response DisableTestEndpoint(CancellationToken cancellationToken = default) + { + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.DisableTestEndpoint"); + scope.Start(); + try + { + var response = _serviceResourceServicesRestClient.DisableTestEndpoint(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Enable test endpoint functionality for a Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/enableTestEndpoint + /// Operation Id: Services_EnableTestEndpoint + /// + /// The cancellation token to use. + public virtual async Task> EnableTestEndpointAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.EnableTestEndpoint"); + scope.Start(); + try + { + var response = await _serviceResourceServicesRestClient.EnableTestEndpointAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Enable test endpoint functionality for a Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/enableTestEndpoint + /// Operation Id: Services_EnableTestEndpoint + /// + /// The cancellation token to use. + public virtual Response EnableTestEndpoint(CancellationToken cancellationToken = default) + { + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.EnableTestEndpoint"); + scope.Start(); + try + { + var response = _serviceResourceServicesRestClient.EnableTestEndpoint(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stop a Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/stop + /// Operation Id: Services_Stop + /// + /// 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 StopAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.Stop"); + scope.Start(); + try + { + var response = await _serviceResourceServicesRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_serviceResourceServicesClientDiagnostics, Pipeline, _serviceResourceServicesRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stop a Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/stop + /// Operation Id: Services_Stop + /// + /// 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 Stop(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.Stop"); + scope.Start(); + try + { + var response = _serviceResourceServicesRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_serviceResourceServicesClientDiagnostics, Pipeline, _serviceResourceServicesRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Start a Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/start + /// Operation Id: Services_Start + /// + /// 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 StartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.Start"); + scope.Start(); + try + { + var response = await _serviceResourceServicesRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_serviceResourceServicesClientDiagnostics, Pipeline, _serviceResourceServicesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Start a Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/start + /// Operation Id: Services_Start + /// + /// 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 Start(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.Start"); + scope.Start(); + try + { + var response = _serviceResourceServicesRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_serviceResourceServicesClientDiagnostics, Pipeline, _serviceResourceServicesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Check if the config server settings are valid. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/validate + /// Operation Id: ConfigServers_Validate + /// + /// 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. + /// Config server settings to be validated. + /// The cancellation token to use. + /// is null. + public virtual async Task> ValidateConfigServerAsync(WaitUntil waitUntil, ConfigServerSettings configServerSettings, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(configServerSettings, nameof(configServerSettings)); + + using var scope = _configServerResourceConfigServersClientDiagnostics.CreateScope("ServiceResource.ValidateConfigServer"); + scope.Start(); + try + { + var response = await _configServerResourceConfigServersRestClient.ValidateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configServerSettings, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new ConfigServerSettingsValidateResultOperationSource(), _configServerResourceConfigServersClientDiagnostics, Pipeline, _configServerResourceConfigServersRestClient.CreateValidateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configServerSettings).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Check if the config server settings are valid. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/validate + /// Operation Id: ConfigServers_Validate + /// + /// 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. + /// Config server settings to be validated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation ValidateConfigServer(WaitUntil waitUntil, ConfigServerSettings configServerSettings, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(configServerSettings, nameof(configServerSettings)); + + using var scope = _configServerResourceConfigServersClientDiagnostics.CreateScope("ServiceResource.ValidateConfigServer"); + scope.Start(); + try + { + var response = _configServerResourceConfigServersRestClient.Validate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configServerSettings, cancellationToken); + var operation = new AppPlatformArmOperation(new ConfigServerSettingsValidateResultOperationSource(), _configServerResourceConfigServersClientDiagnostics, Pipeline, _configServerResourceConfigServersRestClient.CreateValidateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configServerSettings).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List deployments for a certain service + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/deployments + /// Operation Id: Deployments_ListForCluster + /// + /// Version of the deployments to be listed. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetForClusterDeploymentsAsync(IEnumerable version = null, CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("ServiceResource.GetForClusterDeployments"); + scope.Start(); + try + { + var response = await _deploymentResourceDeploymentsRestClient.ListForClusterAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new DeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("ServiceResource.GetForClusterDeployments"); + scope.Start(); + try + { + var response = await _deploymentResourceDeploymentsRestClient.ListForClusterNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new DeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// List deployments for a certain service + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/deployments + /// Operation Id: Deployments_ListForCluster + /// + /// Version of the deployments to be listed. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetForClusterDeployments(IEnumerable version = null, CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("ServiceResource.GetForClusterDeployments"); + scope.Start(); + try + { + var response = _deploymentResourceDeploymentsRestClient.ListForCluster(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, version, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new DeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("ServiceResource.GetForClusterDeployments"); + scope.Start(); + try + { + var response = _deploymentResourceDeploymentsRestClient.ListForClusterNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, version, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new DeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Add a tag to the current resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName} + /// Operation Id: Services_Get + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.AddTag"); + scope.Start(); + try + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _serviceResourceServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ServiceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName} + /// Operation Id: Services_Get + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.AddTag"); + scope.Start(); + try + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _serviceResourceServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ServiceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName} + /// Operation Id: Services_Get + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.SetTags"); + scope.Start(); + try + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _serviceResourceServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ServiceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName} + /// Operation Id: Services_Get + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.SetTags"); + scope.Start(); + try + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _serviceResourceServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ServiceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName} + /// Operation Id: Services_Get + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.RemoveTag"); + scope.Start(); + try + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _serviceResourceServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ServiceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName} + /// Operation Id: Services_Get + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.RemoveTag"); + scope.Start(); + try + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _serviceResourceServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ServiceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceResourceCollection.cs new file mode 100644 index 0000000000000..ff480f75be080 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceResourceCollection.cs @@ -0,0 +1,334 @@ +// 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.Linq; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; + +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 GetServiceResources method from an instance of . + /// + public partial class ServiceResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _serviceResourceServicesClientDiagnostics; + private readonly ServicesRestOperations _serviceResourceServicesRestClient; + + /// Initializes a new instance of the class for mocking. + protected ServiceResourceCollection() + { + } + + /// 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 ServiceResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _serviceResourceServicesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ServiceResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ServiceResource.ResourceType, out string serviceResourceServicesApiVersion); + _serviceResourceServicesRestClient = new ServicesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceResourceServicesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Create a new Service or update an exiting Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName} + /// Operation Id: Services_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 Service resource. + /// 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 serviceName, ServiceResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _serviceResourceServicesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, serviceName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new ServiceResourceOperationSource(Client), _serviceResourceServicesClientDiagnostics, Pipeline, _serviceResourceServicesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, serviceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a new Service or update an exiting Service. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName} + /// Operation Id: Services_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 Service resource. + /// 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 serviceName, ServiceResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _serviceResourceServicesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, serviceName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new ServiceResourceOperationSource(Client), _serviceResourceServicesClientDiagnostics, Pipeline, _serviceResourceServicesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, serviceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Service and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName} + /// Operation Id: Services_Get + /// + /// The name of the Service resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.Get"); + scope.Start(); + try + { + var response = await _serviceResourceServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, serviceName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Service and its properties. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName} + /// Operation Id: Services_Get + /// + /// The name of the Service resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.Get"); + scope.Start(); + try + { + var response = _serviceResourceServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, serviceName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Handles requests to list all resources in a resource group. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring + /// Operation Id: Services_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) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _serviceResourceServicesRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new ServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _serviceResourceServicesRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new ServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Handles requests to list all resources in a resource group. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring + /// Operation Id: Services_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) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _serviceResourceServicesRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new ServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _serviceResourceServicesRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new ServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName} + /// Operation Id: Services_Get + /// + /// The name of the Service resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _serviceResourceServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, serviceName, 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} + /// Operation Id: Services_Get + /// + /// The name of the Service resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.Exists"); + scope.Start(); + try + { + var response = _serviceResourceServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, serviceName, 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/ServiceResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceResourceData.cs new file mode 100644 index 0000000000000..e60033bd67f59 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceResourceData.cs @@ -0,0 +1,44 @@ +// 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.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class representing the ServiceResource data model. + public partial class ServiceResourceData : TrackedResourceData + { + /// Initializes a new instance of ServiceResourceData. + /// The location. + public ServiceResourceData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of ServiceResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Properties of the Service resource. + /// Sku of the Service resource. + internal ServiceResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ClusterResourceProperties properties, AppPlatformSku sku) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + Sku = sku; + } + + /// Properties of the Service resource. + public ClusterResourceProperties Properties { get; set; } + /// Sku of the Service resource. + public AppPlatformSku Sku { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/StorageResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/StorageResource.cs new file mode 100644 index 0000000000000..6cda24dd6488e --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/StorageResource.cs @@ -0,0 +1,249 @@ +// 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 StorageResource 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 GetStorageResource method. + /// Otherwise you can get one from its parent resource using the GetStorageResource method. + /// + public partial class StorageResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string storageName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _storageResourceStoragesClientDiagnostics; + private readonly StoragesRestOperations _storageResourceStoragesRestClient; + private readonly StorageResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected StorageResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal StorageResource(ArmClient client, StorageResourceData 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 StorageResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _storageResourceStoragesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string storageResourceStoragesApiVersion); + _storageResourceStoragesRestClient = new StoragesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, storageResourceStoragesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/storages"; + + /// 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 StorageResourceData 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 storage resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName} + /// Operation Id: Storages_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _storageResourceStoragesClientDiagnostics.CreateScope("StorageResource.Get"); + scope.Start(); + try + { + var response = await _storageResourceStoragesRestClient.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 StorageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the storage resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName} + /// Operation Id: Storages_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _storageResourceStoragesClientDiagnostics.CreateScope("StorageResource.Get"); + scope.Start(); + try + { + var response = _storageResourceStoragesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StorageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the storage resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName} + /// Operation Id: Storages_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 = _storageResourceStoragesClientDiagnostics.CreateScope("StorageResource.Delete"); + scope.Start(); + try + { + var response = await _storageResourceStoragesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_storageResourceStoragesClientDiagnostics, Pipeline, _storageResourceStoragesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the storage resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName} + /// Operation Id: Storages_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 = _storageResourceStoragesClientDiagnostics.CreateScope("StorageResource.Delete"); + scope.Start(); + try + { + var response = _storageResourceStoragesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_storageResourceStoragesClientDiagnostics, Pipeline, _storageResourceStoragesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update storage resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName} + /// Operation Id: Storages_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, StorageResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _storageResourceStoragesClientDiagnostics.CreateScope("StorageResource.Update"); + scope.Start(); + try + { + var response = await _storageResourceStoragesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new StorageResourceOperationSource(Client), _storageResourceStoragesClientDiagnostics, Pipeline, _storageResourceStoragesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update storage resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName} + /// Operation Id: Storages_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, StorageResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _storageResourceStoragesClientDiagnostics.CreateScope("StorageResource.Update"); + scope.Start(); + try + { + var response = _storageResourceStoragesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new StorageResourceOperationSource(Client), _storageResourceStoragesClientDiagnostics, Pipeline, _storageResourceStoragesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + 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/StorageResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/StorageResourceCollection.cs new file mode 100644 index 0000000000000..e50fe2c4f1b59 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/StorageResourceCollection.cs @@ -0,0 +1,333 @@ +// 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.Linq; +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 GetStorageResources method from an instance of . + /// + public partial class StorageResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _storageResourceStoragesClientDiagnostics; + private readonly StoragesRestOperations _storageResourceStoragesRestClient; + + /// Initializes a new instance of the class for mocking. + protected StorageResourceCollection() + { + } + + /// 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 StorageResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _storageResourceStoragesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", StorageResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(StorageResource.ResourceType, out string storageResourceStoragesApiVersion); + _storageResourceStoragesRestClient = new StoragesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, storageResourceStoragesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ServiceResource.ResourceType), nameof(id)); + } + + /// + /// Create or update storage resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName} + /// Operation Id: Storages_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 storage resource. + /// 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 storageName, StorageResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storageName, nameof(storageName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _storageResourceStoragesClientDiagnostics.CreateScope("StorageResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _storageResourceStoragesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, storageName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new StorageResourceOperationSource(Client), _storageResourceStoragesClientDiagnostics, Pipeline, _storageResourceStoragesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, storageName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update storage resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName} + /// Operation Id: Storages_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 storage resource. + /// 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 storageName, StorageResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storageName, nameof(storageName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _storageResourceStoragesClientDiagnostics.CreateScope("StorageResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _storageResourceStoragesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, storageName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new StorageResourceOperationSource(Client), _storageResourceStoragesClientDiagnostics, Pipeline, _storageResourceStoragesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, storageName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the storage resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName} + /// Operation Id: Storages_Get + /// + /// The name of the storage resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string storageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storageName, nameof(storageName)); + + using var scope = _storageResourceStoragesClientDiagnostics.CreateScope("StorageResourceCollection.Get"); + scope.Start(); + try + { + var response = await _storageResourceStoragesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, storageName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StorageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the storage resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName} + /// Operation Id: Storages_Get + /// + /// The name of the storage resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string storageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storageName, nameof(storageName)); + + using var scope = _storageResourceStoragesClientDiagnostics.CreateScope("StorageResourceCollection.Get"); + scope.Start(); + try + { + var response = _storageResourceStoragesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, storageName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StorageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List all the storages of one Azure Spring Cloud instance. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages + /// Operation Id: Storages_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) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _storageResourceStoragesClientDiagnostics.CreateScope("StorageResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _storageResourceStoragesRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new StorageResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _storageResourceStoragesClientDiagnostics.CreateScope("StorageResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _storageResourceStoragesRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new StorageResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// List all the storages of one Azure Spring Cloud instance. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages + /// Operation Id: Storages_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) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _storageResourceStoragesClientDiagnostics.CreateScope("StorageResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _storageResourceStoragesRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new StorageResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _storageResourceStoragesClientDiagnostics.CreateScope("StorageResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _storageResourceStoragesRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new StorageResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName} + /// Operation Id: Storages_Get + /// + /// The name of the storage resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string storageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storageName, nameof(storageName)); + + using var scope = _storageResourceStoragesClientDiagnostics.CreateScope("StorageResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _storageResourceStoragesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, storageName, 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}/storages/{storageName} + /// Operation Id: Storages_Get + /// + /// The name of the storage resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string storageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storageName, nameof(storageName)); + + using var scope = _storageResourceStoragesClientDiagnostics.CreateScope("StorageResourceCollection.Exists"); + scope.Start(); + try + { + var response = _storageResourceStoragesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, storageName, 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/StorageResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/StorageResourceData.cs new file mode 100644 index 0000000000000..9469578f21567 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/StorageResourceData.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class representing the StorageResource data model. + public partial class StorageResourceData : ResourceData + { + /// Initializes a new instance of StorageResourceData. + public StorageResourceData() + { + } + + /// Initializes a new instance of StorageResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Properties of the storage resource payload. + internal StorageResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, StorageProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// Properties of the storage resource payload. + public StorageProperties Properties { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedBuildpackResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedBuildpackResource.cs new file mode 100644 index 0000000000000..90e7f51677f36 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedBuildpackResource.cs @@ -0,0 +1,137 @@ +// 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 SupportedBuildpackResource 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 GetSupportedBuildpackResource method. + /// Otherwise you can get one from its parent resource using the GetSupportedBuildpackResource method. + /// + public partial class SupportedBuildpackResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildpackName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedBuildpacks/{buildpackName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _supportedBuildpackResourceBuildServiceClientDiagnostics; + private readonly BuildServiceRestOperations _supportedBuildpackResourceBuildServiceRestClient; + private readonly SupportedBuildpackResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected SupportedBuildpackResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SupportedBuildpackResource(ArmClient client, SupportedBuildpackResourceData 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 SupportedBuildpackResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _supportedBuildpackResourceBuildServiceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string supportedBuildpackResourceBuildServiceApiVersion); + _supportedBuildpackResourceBuildServiceRestClient = new BuildServiceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, supportedBuildpackResourceBuildServiceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/buildServices/supportedBuildpacks"; + + /// 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 SupportedBuildpackResourceData 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 supported buildpack resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedBuildpacks/{buildpackName} + /// Operation Id: BuildService_GetSupportedBuildpack + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _supportedBuildpackResourceBuildServiceClientDiagnostics.CreateScope("SupportedBuildpackResource.Get"); + scope.Start(); + try + { + var response = await _supportedBuildpackResourceBuildServiceRestClient.GetSupportedBuildpackAsync(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 SupportedBuildpackResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the supported buildpack resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedBuildpacks/{buildpackName} + /// Operation Id: BuildService_GetSupportedBuildpack + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _supportedBuildpackResourceBuildServiceClientDiagnostics.CreateScope("SupportedBuildpackResource.Get"); + scope.Start(); + try + { + var response = _supportedBuildpackResourceBuildServiceRestClient.GetSupportedBuildpack(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 SupportedBuildpackResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedBuildpackResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedBuildpackResourceCollection.cs new file mode 100644 index 0000000000000..a65b93a5e5469 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedBuildpackResourceCollection.cs @@ -0,0 +1,237 @@ +// 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.Linq; +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 GetSupportedBuildpackResources method from an instance of . + /// + public partial class SupportedBuildpackResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _supportedBuildpackResourceBuildServiceClientDiagnostics; + private readonly BuildServiceRestOperations _supportedBuildpackResourceBuildServiceRestClient; + + /// Initializes a new instance of the class for mocking. + protected SupportedBuildpackResourceCollection() + { + } + + /// 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 SupportedBuildpackResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _supportedBuildpackResourceBuildServiceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", SupportedBuildpackResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SupportedBuildpackResource.ResourceType, out string supportedBuildpackResourceBuildServiceApiVersion); + _supportedBuildpackResourceBuildServiceRestClient = new BuildServiceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, supportedBuildpackResourceBuildServiceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != BuildServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, BuildServiceResource.ResourceType), nameof(id)); + } + + /// + /// Get the supported buildpack resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedBuildpacks/{buildpackName} + /// Operation Id: BuildService_GetSupportedBuildpack + /// + /// The name of the buildpack resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string buildpackName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildpackName, nameof(buildpackName)); + + using var scope = _supportedBuildpackResourceBuildServiceClientDiagnostics.CreateScope("SupportedBuildpackResourceCollection.Get"); + scope.Start(); + try + { + var response = await _supportedBuildpackResourceBuildServiceRestClient.GetSupportedBuildpackAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, buildpackName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SupportedBuildpackResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the supported buildpack resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedBuildpacks/{buildpackName} + /// Operation Id: BuildService_GetSupportedBuildpack + /// + /// The name of the buildpack resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string buildpackName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildpackName, nameof(buildpackName)); + + using var scope = _supportedBuildpackResourceBuildServiceClientDiagnostics.CreateScope("SupportedBuildpackResourceCollection.Get"); + scope.Start(); + try + { + var response = _supportedBuildpackResourceBuildServiceRestClient.GetSupportedBuildpack(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, buildpackName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SupportedBuildpackResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get all supported buildpacks. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedBuildpacks + /// Operation Id: BuildService_ListSupportedBuildpacks + /// + /// 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) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _supportedBuildpackResourceBuildServiceClientDiagnostics.CreateScope("SupportedBuildpackResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _supportedBuildpackResourceBuildServiceRestClient.ListSupportedBuildpacksAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new SupportedBuildpackResource(Client, value)), null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, null); + } + + /// + /// Get all supported buildpacks. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedBuildpacks + /// Operation Id: BuildService_ListSupportedBuildpacks + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _supportedBuildpackResourceBuildServiceClientDiagnostics.CreateScope("SupportedBuildpackResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _supportedBuildpackResourceBuildServiceRestClient.ListSupportedBuildpacks(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new SupportedBuildpackResource(Client, value)), null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, null); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedBuildpacks/{buildpackName} + /// Operation Id: BuildService_GetSupportedBuildpack + /// + /// The name of the buildpack resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string buildpackName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildpackName, nameof(buildpackName)); + + using var scope = _supportedBuildpackResourceBuildServiceClientDiagnostics.CreateScope("SupportedBuildpackResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _supportedBuildpackResourceBuildServiceRestClient.GetSupportedBuildpackAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, buildpackName, 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}/buildServices/{buildServiceName}/supportedBuildpacks/{buildpackName} + /// Operation Id: BuildService_GetSupportedBuildpack + /// + /// The name of the buildpack resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string buildpackName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildpackName, nameof(buildpackName)); + + using var scope = _supportedBuildpackResourceBuildServiceClientDiagnostics.CreateScope("SupportedBuildpackResourceCollection.Exists"); + scope.Start(); + try + { + var response = _supportedBuildpackResourceBuildServiceRestClient.GetSupportedBuildpack(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, buildpackName, 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/SupportedBuildpackResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedBuildpackResourceData.cs new file mode 100644 index 0000000000000..45dd6886db6c2 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedBuildpackResourceData.cs @@ -0,0 +1,47 @@ +// 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 SupportedBuildpackResource data model. + public partial class SupportedBuildpackResourceData : ResourceData + { + /// Initializes a new instance of SupportedBuildpackResourceData. + public SupportedBuildpackResourceData() + { + } + + /// Initializes a new instance of SupportedBuildpackResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Supported buildpack resource properties. + internal SupportedBuildpackResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, SupportedBuildpackResourceProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// Supported buildpack resource properties. + internal SupportedBuildpackResourceProperties Properties { get; set; } + /// The id of supported buildpack. + public string SupportedBuildpackId + { + get => Properties is null ? default : Properties.BuildpackId; + set + { + if (Properties is null) + Properties = new SupportedBuildpackResourceProperties(); + Properties.BuildpackId = value; + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedStackResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedStackResource.cs new file mode 100644 index 0000000000000..e2a9d5578b727 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedStackResource.cs @@ -0,0 +1,137 @@ +// 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 SupportedStackResource 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 GetSupportedStackResource method. + /// Otherwise you can get one from its parent resource using the GetSupportedStackResource method. + /// + public partial class SupportedStackResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string stackName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedStacks/{stackName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _supportedStackResourceBuildServiceClientDiagnostics; + private readonly BuildServiceRestOperations _supportedStackResourceBuildServiceRestClient; + private readonly SupportedStackResourceData _data; + + /// Initializes a new instance of the class for mocking. + protected SupportedStackResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SupportedStackResource(ArmClient client, SupportedStackResourceData 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 SupportedStackResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _supportedStackResourceBuildServiceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string supportedStackResourceBuildServiceApiVersion); + _supportedStackResourceBuildServiceRestClient = new BuildServiceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, supportedStackResourceBuildServiceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AppPlatform/Spring/buildServices/supportedStacks"; + + /// 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 SupportedStackResourceData 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 supported stack resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedStacks/{stackName} + /// Operation Id: BuildService_GetSupportedStack + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _supportedStackResourceBuildServiceClientDiagnostics.CreateScope("SupportedStackResource.Get"); + scope.Start(); + try + { + var response = await _supportedStackResourceBuildServiceRestClient.GetSupportedStackAsync(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 SupportedStackResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the supported stack resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedStacks/{stackName} + /// Operation Id: BuildService_GetSupportedStack + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _supportedStackResourceBuildServiceClientDiagnostics.CreateScope("SupportedStackResource.Get"); + scope.Start(); + try + { + var response = _supportedStackResourceBuildServiceRestClient.GetSupportedStack(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 SupportedStackResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedStackResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedStackResourceCollection.cs new file mode 100644 index 0000000000000..a93669d02659b --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedStackResourceCollection.cs @@ -0,0 +1,237 @@ +// 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.Linq; +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 GetSupportedStackResources method from an instance of . + /// + public partial class SupportedStackResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _supportedStackResourceBuildServiceClientDiagnostics; + private readonly BuildServiceRestOperations _supportedStackResourceBuildServiceRestClient; + + /// Initializes a new instance of the class for mocking. + protected SupportedStackResourceCollection() + { + } + + /// 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 SupportedStackResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _supportedStackResourceBuildServiceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", SupportedStackResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SupportedStackResource.ResourceType, out string supportedStackResourceBuildServiceApiVersion); + _supportedStackResourceBuildServiceRestClient = new BuildServiceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, supportedStackResourceBuildServiceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != BuildServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, BuildServiceResource.ResourceType), nameof(id)); + } + + /// + /// Get the supported stack resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedStacks/{stackName} + /// Operation Id: BuildService_GetSupportedStack + /// + /// The name of the stack resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string stackName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(stackName, nameof(stackName)); + + using var scope = _supportedStackResourceBuildServiceClientDiagnostics.CreateScope("SupportedStackResourceCollection.Get"); + scope.Start(); + try + { + var response = await _supportedStackResourceBuildServiceRestClient.GetSupportedStackAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, stackName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SupportedStackResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the supported stack resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedStacks/{stackName} + /// Operation Id: BuildService_GetSupportedStack + /// + /// The name of the stack resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string stackName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(stackName, nameof(stackName)); + + using var scope = _supportedStackResourceBuildServiceClientDiagnostics.CreateScope("SupportedStackResourceCollection.Get"); + scope.Start(); + try + { + var response = _supportedStackResourceBuildServiceRestClient.GetSupportedStack(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, stackName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SupportedStackResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get all supported stacks. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedStacks + /// Operation Id: BuildService_ListSupportedStacks + /// + /// 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) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _supportedStackResourceBuildServiceClientDiagnostics.CreateScope("SupportedStackResourceCollection.GetAll"); + scope.Start(); + try + { + var response = await _supportedStackResourceBuildServiceRestClient.ListSupportedStacksAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new SupportedStackResource(Client, value)), null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, null); + } + + /// + /// Get all supported stacks. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedStacks + /// Operation Id: BuildService_ListSupportedStacks + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _supportedStackResourceBuildServiceClientDiagnostics.CreateScope("SupportedStackResourceCollection.GetAll"); + scope.Start(); + try + { + var response = _supportedStackResourceBuildServiceRestClient.ListSupportedStacks(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new SupportedStackResource(Client, value)), null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, null); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedStacks/{stackName} + /// Operation Id: BuildService_GetSupportedStack + /// + /// The name of the stack resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string stackName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(stackName, nameof(stackName)); + + using var scope = _supportedStackResourceBuildServiceClientDiagnostics.CreateScope("SupportedStackResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _supportedStackResourceBuildServiceRestClient.GetSupportedStackAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, stackName, 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}/buildServices/{buildServiceName}/supportedStacks/{stackName} + /// Operation Id: BuildService_GetSupportedStack + /// + /// The name of the stack resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string stackName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(stackName, nameof(stackName)); + + using var scope = _supportedStackResourceBuildServiceClientDiagnostics.CreateScope("SupportedStackResourceCollection.Exists"); + scope.Start(); + try + { + var response = _supportedStackResourceBuildServiceRestClient.GetSupportedStack(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, stackName, 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/SupportedStackResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedStackResourceData.cs new file mode 100644 index 0000000000000..c08908aa8c5f6 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedStackResourceData.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.AppPlatform.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppPlatform +{ + /// A class representing the SupportedStackResource data model. + public partial class SupportedStackResourceData : ResourceData + { + /// Initializes a new instance of SupportedStackResourceData. + public SupportedStackResourceData() + { + } + + /// Initializes a new instance of SupportedStackResourceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Supported stack resource properties. + internal SupportedStackResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, SupportedStackResourceProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// Supported stack resource properties. + public SupportedStackResourceProperties Properties { get; set; } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Properties/AssemblyInfo.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000000..c7af415fa707c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Properties/AssemblyInfo.cs @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.AppPlatform")] + +[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] +[assembly: InternalsVisibleTo("Azure.ResourceManager.AppPlatform.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md new file mode 100644 index 0000000000000..34283d4fe2639 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md @@ -0,0 +1,57 @@ +# Generated code configuration + +Run `dotnet build /t:GenerateCode` to generate code. + +``` yaml + +azure-arm: true +csharp: true +library-name: AppPlatform +namespace: Azure.ResourceManager.AppPlatform +require: https://github.com/Azure/azure-rest-api-specs/blob/688cfd36391115f70ea9276a8e526caea6a5c8ad/specification/appplatform/resource-manager/readme.md +output-folder: $(this-folder)/Generated +tag: package-preview-2022-03 +clear-output-folder: true +skip-csproj: true +flatten-payloads: false + +rename-rules: + CPU: Cpu + CPUs: Cpus + Os: OS + Ip: IP + Ips: IPs + ID: Id + IDs: Ids + VM: Vm + VMs: Vms + VMScaleSet: VmScaleSet + DNS: Dns + VPN: Vpn + NAT: Nat + WAN: Wan + Ipv4: IPv4 + Ipv6: IPv6 + Ipsec: IPsec + SSO: Sso + URI: Uri + +directive: + - from: swagger-document + where: $.definitions..location + transform: > + $['x-ms-format'] = 'azure-location'; + - from: swagger-document + where: $.paths..parameters[?(@.name === 'location')] + transform: > + $['x-ms-format'] = 'azure-location'; + - from: swagger-document + where: $.definitions + transform: > + $.CustomPersistentDiskProperties.properties.type['x-ms-enum']['name'] = 'UnderlyingResourceType'; + $.DiagnosticParameters.properties.duration['x-ms-client-name'] = 'DurationValue'; + $.LoadedCertificate.properties.resourceId['x-ms-format'] = 'arm-id'; + $.BindingResourceProperties.properties.resourceId['x-ms-format'] = 'arm-id'; + $.NetworkProfile.properties.serviceRuntimeSubnetId['x-ms-format'] = 'arm-id'; + $.NetworkProfile.properties.appSubnetId['x-ms-format'] = 'arm-id'; +``` \ No newline at end of file diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/tests/AppPlatformManagementTestBase.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/tests/AppPlatformManagementTestBase.cs new file mode 100644 index 0000000000000..7d33354261be6 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/tests/AppPlatformManagementTestBase.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.TestFramework; +using NUnit.Framework; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.AppPlatform.Tests +{ + public class AppPlatformManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + + protected AppPlatformManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected AppPlatformManagementTestBase(bool isAsync) + : base(isAsync) + { + } + + [SetUp] + public void CreateCommonClient() + { + Client = GetArmClient(); + } + + protected async Task CreateResourceGroup(SubscriptionResource subscription, string rgNamePrefix, AzureLocation location) + { + string rgName = Recording.GenerateAssetName(rgNamePrefix); + ResourceGroupData input = new ResourceGroupData(location); + var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, rgName, input); + return lro.Value; + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/tests/AppPlatformManagementTestEnvironment.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/tests/AppPlatformManagementTestEnvironment.cs new file mode 100644 index 0000000000000..3fc90daef5dab --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/tests/AppPlatformManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.AppPlatform.Tests +{ + public class AppPlatformManagementTestEnvironment : TestEnvironment + { + } +} \ No newline at end of file diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/tests/Azure.ResourceManager.AppPlatform.Tests.csproj b/sdk/appplatform/Azure.ResourceManager.AppPlatform/tests/Azure.ResourceManager.AppPlatform.Tests.csproj new file mode 100644 index 0000000000000..8bbcea9ba0d9a --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/tests/Azure.ResourceManager.AppPlatform.Tests.csproj @@ -0,0 +1,5 @@ + + + + + diff --git a/sdk/appplatform/ci.yml b/sdk/appplatform/ci.yml new file mode 100644 index 0000000000000..b1ac9ec3ad869 --- /dev/null +++ b/sdk/appplatform/ci.yml @@ -0,0 +1,32 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + paths: + include: + - sdk/appplatform/ + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/appplatform/ + - sdk/resourcemanager/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: appplatform + ArtifactName: packages + Artifacts: + - name: Azure.ResourceManager.AppPlatform + safeName: AzureResourceManagerAppPlatform From 9c5d144e56fe370e85d11e07439706e303a50f52 Mon Sep 17 00:00:00 2001 From: Arthur Ma Date: Wed, 1 Jun 2022 17:05:02 +0800 Subject: [PATCH 2/9] Update api sig --- ...sourceManager.AppPlatform.netstandard2.0.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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 5047d6a162212..c6a94c3d590c6 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 @@ -76,8 +76,8 @@ public ApiPortalResourceData() { } } public static partial class AppPlatformExtensions { - public static Azure.Response CheckNameAvailabilityService(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, Azure.ResourceManager.AppPlatform.Models.NameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> CheckNameAvailabilityServiceAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, Azure.ResourceManager.AppPlatform.Models.NameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response CheckNameAvailabilityService(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.AppPlatform.Models.NameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> CheckNameAvailabilityServiceAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.AppPlatform.Models.NameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.AppPlatform.ApiPortalCustomDomainResource GetApiPortalCustomDomainResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.ApiPortalResource GetApiPortalResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.AppResource GetAppResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -160,7 +160,7 @@ public partial class AppResourceData : Azure.ResourceManager.Models.ResourceData { public AppResourceData() { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public string Location { get { throw null; } set { } } + public Azure.Core.AzureLocation? Location { get { throw null; } set { } } public Azure.ResourceManager.AppPlatform.Models.AppResourceProperties Properties { get { throw null; } set { } } } public partial class BindingResource : Azure.ResourceManager.ArmResource @@ -1028,7 +1028,7 @@ public BindingResourceProperties() { } public string CreatedAt { get { throw null; } } public string GeneratedProperties { get { throw null; } } public string Key { get { throw null; } set { } } - public string ResourceId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } public string ResourceName { get { throw null; } } public string ResourceType { get { throw null; } } public string UpdatedAt { get { throw null; } } @@ -1687,9 +1687,9 @@ public KeyVaultCertificateProperties(System.Uri vaultUri, string keyVaultCertNam } public partial class LoadedCertificate { - public LoadedCertificate(string resourceId) { } + public LoadedCertificate(Azure.Core.ResourceIdentifier resourceId) { } public bool? LoadTrustStore { get { throw null; } set { } } - public string ResourceId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } } public partial class LogFileUrlResponse { @@ -1749,12 +1749,12 @@ public partial class NetworkProfile { public NetworkProfile() { } public string AppNetworkResourceGroup { get { throw null; } set { } } - public string AppSubnetId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier AppSubnetId { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList OutboundPublicIPs { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredTraffics { get { throw null; } } public string ServiceCidr { get { throw null; } set { } } public string ServiceRuntimeNetworkResourceGroup { get { throw null; } set { } } - public string ServiceRuntimeSubnetId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ServiceRuntimeSubnetId { get { throw null; } set { } } } public partial class PersistentDisk { @@ -1848,7 +1848,7 @@ internal ResourceSkuCapabilities() { } public partial class ResourceSkuLocationInfo { internal ResourceSkuLocationInfo() { } - public string Location { get { throw null; } } + public Azure.Core.AzureLocation? Location { get { throw null; } } public System.Collections.Generic.IReadOnlyList ZoneDetails { get { throw null; } } public System.Collections.Generic.IReadOnlyList Zones { get { throw null; } } } From 3cbbee48ebdf6877c76d4b8300cf0de117edc417 Mon Sep 17 00:00:00 2001 From: Arthur Ma Date: Wed, 1 Jun 2022 18:12:48 +0800 Subject: [PATCH 3/9] Update spell check --- .vscode/cspell.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 1f2a4e9d5b868..e88887ebc5ecb 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -97,6 +97,13 @@ "filename": "**/eng/pipelines/templates/jobs/ci.yml", "words": ["warnaserror"] }, + { + "filename": "**/sdk/appplatform/**/*.cs", + "words": [ + "dynatrace", + "fqdns" + ] + }, { "filename": "**/sdk/azurestackhci/**/*.cs", "words": [ From 9c776d0f4fbfd037cfb63e22b40e9b56aede7f8e Mon Sep 17 00:00:00 2001 From: Arthur Ma Date: Wed, 1 Jun 2022 19:01:40 +0800 Subject: [PATCH 4/9] Update the `CheckNameAvailability` func name --- .../Azure.ResourceManager.AppPlatform.netstandard2.0.cs | 4 ++-- .../src/Generated/Extensions/AppPlatformExtensions.cs | 8 ++++---- .../Extensions/SubscriptionResourceExtensionClient.cs | 8 ++++---- .../Azure.ResourceManager.AppPlatform/src/autorest.md | 2 ++ 4 files changed, 12 insertions(+), 10 deletions(-) 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 c6a94c3d590c6..7619d39a8955d 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 @@ -76,8 +76,8 @@ public ApiPortalResourceData() { } } public static partial class AppPlatformExtensions { - public static Azure.Response CheckNameAvailabilityService(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.AppPlatform.Models.NameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> CheckNameAvailabilityServiceAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.AppPlatform.Models.NameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response CheckServiceNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.AppPlatform.Models.NameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> CheckServiceNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.AppPlatform.Models.NameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.AppPlatform.ApiPortalCustomDomainResource GetApiPortalCustomDomainResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.ApiPortalResource GetApiPortalResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.AppResource GetAppResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } 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 9fcf052c4d46c..69bd7d996f14e 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/AppPlatformExtensions.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/AppPlatformExtensions.cs @@ -73,11 +73,11 @@ private static SubscriptionResourceExtensionClient GetExtensionClient(Subscripti /// Parameters supplied to the operation. /// The cancellation token to use. /// is null. - public static async Task> CheckNameAvailabilityServiceAsync(this SubscriptionResource subscriptionResource, AzureLocation location, NameAvailabilityContent content, CancellationToken cancellationToken = default) + public static async Task> CheckServiceNameAvailabilityAsync(this SubscriptionResource subscriptionResource, AzureLocation location, NameAvailabilityContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - return await GetExtensionClient(subscriptionResource).CheckNameAvailabilityServiceAsync(location, content, cancellationToken).ConfigureAwait(false); + return await GetExtensionClient(subscriptionResource).CheckServiceNameAvailabilityAsync(location, content, cancellationToken).ConfigureAwait(false); } /// @@ -90,11 +90,11 @@ public static async Task> CheckNameAvailabilityServic /// Parameters supplied to the operation. /// The cancellation token to use. /// is null. - public static Response CheckNameAvailabilityService(this SubscriptionResource subscriptionResource, AzureLocation location, NameAvailabilityContent content, CancellationToken cancellationToken = default) + public static Response CheckServiceNameAvailability(this SubscriptionResource subscriptionResource, AzureLocation location, NameAvailabilityContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - return GetExtensionClient(subscriptionResource).CheckNameAvailabilityService(location, content, cancellationToken); + return GetExtensionClient(subscriptionResource).CheckServiceNameAvailability(location, content, cancellationToken); } /// diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs index 602c82926f7ec..0ae6ec17ee65d 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -56,9 +56,9 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// the region. /// Parameters supplied to the operation. /// The cancellation token to use. - public virtual async Task> CheckNameAvailabilityServiceAsync(AzureLocation location, NameAvailabilityContent content, CancellationToken cancellationToken = default) + public virtual async Task> CheckServiceNameAvailabilityAsync(AzureLocation location, NameAvailabilityContent content, CancellationToken cancellationToken = default) { - using var scope = ServiceResourceServicesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckNameAvailabilityService"); + using var scope = ServiceResourceServicesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckServiceNameAvailability"); scope.Start(); try { @@ -80,9 +80,9 @@ public virtual async Task> CheckNameAvailabilityServi /// the region. /// Parameters supplied to the operation. /// The cancellation token to use. - public virtual Response CheckNameAvailabilityService(AzureLocation location, NameAvailabilityContent content, CancellationToken cancellationToken = default) + public virtual Response CheckServiceNameAvailability(AzureLocation location, NameAvailabilityContent content, CancellationToken cancellationToken = default) { - using var scope = ServiceResourceServicesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckNameAvailabilityService"); + using var scope = ServiceResourceServicesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckServiceNameAvailability"); scope.Start(); try { diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md index 34283d4fe2639..5ae8d3fffb40a 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md @@ -35,6 +35,8 @@ rename-rules: Ipsec: IPsec SSO: Sso URI: Uri +override-operation-name: + Services_CheckNameAvailability: CheckServiceNameAvailability directive: - from: swagger-document From 090ea9212753ea528fcde0d0a460254b0cbe591d Mon Sep 17 00:00:00 2001 From: Arthur Ma Date: Wed, 1 Jun 2022 19:10:47 +0800 Subject: [PATCH 5/9] Rename `CheckNameAvailabilityContent` and `CheckNameAvailabilityResult` --- ...ourceManager.AppPlatform.netstandard2.0.cs | 30 +++++++++---------- .../Extensions/AppPlatformExtensions.cs | 4 +-- .../SubscriptionResourceExtensionClient.cs | 4 +-- ...kNameAvailabilityContent.Serialization.cs} | 2 +- ...ent.cs => CheckNameAvailabilityContent.cs} | 6 ++-- ...ckNameAvailabilityResult.Serialization.cs} | 6 ++-- ...lity.cs => CheckNameAvailabilityResult.cs} | 10 +++---- .../RestOperations/ServicesRestOperations.cs | 14 ++++----- .../src/autorest.md | 2 ++ 9 files changed, 40 insertions(+), 38 deletions(-) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{NameAvailabilityContent.Serialization.cs => CheckNameAvailabilityContent.Serialization.cs} (88%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{NameAvailabilityContent.cs => CheckNameAvailabilityContent.cs} (83%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{NameAvailability.Serialization.cs => CheckNameAvailabilityResult.Serialization.cs} (81%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{NameAvailability.cs => CheckNameAvailabilityResult.cs} (72%) 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 7619d39a8955d..0b324f2d68309 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 @@ -76,8 +76,8 @@ public ApiPortalResourceData() { } } public static partial class AppPlatformExtensions { - public static Azure.Response CheckServiceNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.AppPlatform.Models.NameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> CheckServiceNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.AppPlatform.Models.NameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response CheckServiceNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.AppPlatform.Models.CheckNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> CheckServiceNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.AppPlatform.Models.CheckNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.AppPlatform.ApiPortalCustomDomainResource GetApiPortalCustomDomainResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.ApiPortalResource GetApiPortalResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.AppResource GetAppResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -1257,6 +1257,19 @@ public CertificateProperties() { } public string SubjectName { get { throw null; } } public string Thumbprint { get { throw null; } } } + public partial class CheckNameAvailabilityContent + { + public CheckNameAvailabilityContent(string resourceType, string name) { } + public string Name { get { throw null; } } + public string ResourceType { get { throw null; } } + } + public partial class CheckNameAvailabilityResult + { + internal CheckNameAvailabilityResult() { } + public string Message { get { throw null; } } + public bool? NameAvailable { get { throw null; } } + public string Reason { get { throw null; } } + } public partial class ClusterResourceProperties { public ClusterResourceProperties() { } @@ -1726,19 +1739,6 @@ public MonitoringSettingProperties() { } public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.MonitoringSettingState left, Azure.ResourceManager.AppPlatform.Models.MonitoringSettingState right) { throw null; } public override string ToString() { throw null; } } - public partial class NameAvailability - { - internal NameAvailability() { } - public string Message { get { throw null; } } - public bool? NameAvailable { get { throw null; } } - public string Reason { get { throw null; } } - } - public partial class NameAvailabilityContent - { - public NameAvailabilityContent(string resourceType, string name) { } - public string Name { get { throw null; } } - public string ResourceType { get { throw null; } } - } public partial class NetCoreZipUploadedUserSourceInfo : Azure.ResourceManager.AppPlatform.Models.UploadedUserSourceInfo { public NetCoreZipUploadedUserSourceInfo() { } 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 69bd7d996f14e..904291f1fe8df 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/AppPlatformExtensions.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/AppPlatformExtensions.cs @@ -73,7 +73,7 @@ private static SubscriptionResourceExtensionClient GetExtensionClient(Subscripti /// Parameters supplied to the operation. /// The cancellation token to use. /// is null. - public static async Task> CheckServiceNameAvailabilityAsync(this SubscriptionResource subscriptionResource, AzureLocation location, NameAvailabilityContent content, CancellationToken cancellationToken = default) + public static async Task> CheckServiceNameAvailabilityAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CheckNameAvailabilityContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -90,7 +90,7 @@ public static async Task> CheckServiceNameAvailabilit /// Parameters supplied to the operation. /// The cancellation token to use. /// is null. - public static Response CheckServiceNameAvailability(this SubscriptionResource subscriptionResource, AzureLocation location, NameAvailabilityContent content, CancellationToken cancellationToken = default) + public static Response CheckServiceNameAvailability(this SubscriptionResource subscriptionResource, AzureLocation location, CheckNameAvailabilityContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs index 0ae6ec17ee65d..4f7244d4a3705 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -56,7 +56,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// the region. /// Parameters supplied to the operation. /// The cancellation token to use. - public virtual async Task> CheckServiceNameAvailabilityAsync(AzureLocation location, NameAvailabilityContent content, CancellationToken cancellationToken = default) + public virtual async Task> CheckServiceNameAvailabilityAsync(AzureLocation location, CheckNameAvailabilityContent content, CancellationToken cancellationToken = default) { using var scope = ServiceResourceServicesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckServiceNameAvailability"); scope.Start(); @@ -80,7 +80,7 @@ public virtual async Task> CheckServiceNameAvailabili /// the region. /// Parameters supplied to the operation. /// The cancellation token to use. - public virtual Response CheckServiceNameAvailability(AzureLocation location, NameAvailabilityContent content, CancellationToken cancellationToken = default) + public virtual Response CheckServiceNameAvailability(AzureLocation location, CheckNameAvailabilityContent content, CancellationToken cancellationToken = default) { using var scope = ServiceResourceServicesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckServiceNameAvailability"); scope.Start(); diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailabilityContent.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CheckNameAvailabilityContent.Serialization.cs similarity index 88% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailabilityContent.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CheckNameAvailabilityContent.Serialization.cs index b2fc260fa6ecc..ac846a406aeed 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailabilityContent.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CheckNameAvailabilityContent.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.AppPlatform.Models { - public partial class NameAvailabilityContent : IUtf8JsonSerializable + public partial class CheckNameAvailabilityContent : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailabilityContent.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CheckNameAvailabilityContent.cs similarity index 83% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailabilityContent.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CheckNameAvailabilityContent.cs index 40907e227c081..8c5db334026fd 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailabilityContent.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CheckNameAvailabilityContent.cs @@ -10,13 +10,13 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Name availability parameters payload. - public partial class NameAvailabilityContent + public partial class CheckNameAvailabilityContent { - /// Initializes a new instance of NameAvailabilityContent. + /// Initializes a new instance of CheckNameAvailabilityContent. /// Type of the resource to check name availability. /// Name to be checked. /// or is null. - public NameAvailabilityContent(string resourceType, string name) + public CheckNameAvailabilityContent(string resourceType, string name) { if (resourceType == null) { diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailability.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CheckNameAvailabilityResult.Serialization.cs similarity index 81% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailability.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CheckNameAvailabilityResult.Serialization.cs index 048944055dac0..f7757cdc6f093 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailability.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CheckNameAvailabilityResult.Serialization.cs @@ -10,9 +10,9 @@ namespace Azure.ResourceManager.AppPlatform.Models { - public partial class NameAvailability + public partial class CheckNameAvailabilityResult { - internal static NameAvailability DeserializeNameAvailability(JsonElement element) + internal static CheckNameAvailabilityResult DeserializeCheckNameAvailabilityResult(JsonElement element) { Optional nameAvailable = default; Optional reason = default; @@ -40,7 +40,7 @@ internal static NameAvailability DeserializeNameAvailability(JsonElement element continue; } } - return new NameAvailability(Optional.ToNullable(nameAvailable), reason.Value, message.Value); + return new CheckNameAvailabilityResult(Optional.ToNullable(nameAvailable), reason.Value, message.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailability.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CheckNameAvailabilityResult.cs similarity index 72% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailability.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CheckNameAvailabilityResult.cs index 5fb7f8ee3848e..5e259919142b7 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/NameAvailability.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CheckNameAvailabilityResult.cs @@ -8,18 +8,18 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Name availability result payload. - public partial class NameAvailability + public partial class CheckNameAvailabilityResult { - /// Initializes a new instance of NameAvailability. - internal NameAvailability() + /// Initializes a new instance of CheckNameAvailabilityResult. + internal CheckNameAvailabilityResult() { } - /// Initializes a new instance of NameAvailability. + /// Initializes a new instance of CheckNameAvailabilityResult. /// Indicates whether the name is available. /// Reason why the name is not available. /// Message why the name is not available. - internal NameAvailability(bool? nameAvailable, string reason, string message) + internal CheckNameAvailabilityResult(bool? nameAvailable, string reason, string message) { NameAvailable = nameAvailable; Reason = reason; 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 3d49cb558f31a..681dd3fdf3162 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ServicesRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ServicesRestOperations.cs @@ -801,7 +801,7 @@ public Response Start(string subscriptionId, string resourceGroupName, string se } } - internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, AzureLocation location, NameAvailabilityContent content) + internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, AzureLocation location, CheckNameAvailabilityContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -831,7 +831,7 @@ internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, A /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public async Task> CheckNameAvailabilityAsync(string subscriptionId, AzureLocation location, NameAvailabilityContent content, CancellationToken cancellationToken = default) + public async Task> CheckNameAvailabilityAsync(string subscriptionId, AzureLocation location, CheckNameAvailabilityContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNull(content, nameof(content)); @@ -842,9 +842,9 @@ public async Task> CheckNameAvailabilityAsync(string { case 200: { - NameAvailability value = default; + CheckNameAvailabilityResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = NameAvailability.DeserializeNameAvailability(document.RootElement); + value = CheckNameAvailabilityResult.DeserializeCheckNameAvailabilityResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -859,7 +859,7 @@ public async Task> CheckNameAvailabilityAsync(string /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public Response CheckNameAvailability(string subscriptionId, AzureLocation location, NameAvailabilityContent content, CancellationToken cancellationToken = default) + public Response CheckNameAvailability(string subscriptionId, AzureLocation location, CheckNameAvailabilityContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNull(content, nameof(content)); @@ -870,9 +870,9 @@ public Response CheckNameAvailability(string subscriptionId, A { case 200: { - NameAvailability value = default; + CheckNameAvailabilityResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = NameAvailability.DeserializeNameAvailability(document.RootElement); + value = CheckNameAvailabilityResult.DeserializeCheckNameAvailabilityResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md index 5ae8d3fffb40a..4a7ce3f129b99 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md @@ -56,4 +56,6 @@ directive: $.BindingResourceProperties.properties.resourceId['x-ms-format'] = 'arm-id'; $.NetworkProfile.properties.serviceRuntimeSubnetId['x-ms-format'] = 'arm-id'; $.NetworkProfile.properties.appSubnetId['x-ms-format'] = 'arm-id'; + $.NameAvailabilityParameters['x-ms-client-name'] = 'CheckNameAvailabilityContent'; + $.NameAvailability['x-ms-client-name'] = 'CheckNameAvailabilityResult'; ``` \ No newline at end of file From dddc5ece184a9bbc0915f9dd00dd10b6a23de91c Mon Sep 17 00:00:00 2001 From: Arthur Ma Date: Sat, 4 Jun 2022 11:34:29 +0800 Subject: [PATCH 6/9] Another bunch of directives --- ...ourceManager.AppPlatform.netstandard2.0.cs | 616 +++++++++--------- ...ildCollection.cs => AppBuildCollection.cs} | 114 ++-- .../{BuildData.cs => AppBuildData.cs} | 14 +- .../{BuildResource.cs => AppBuildResource.cs} | 86 +-- ...lection.cs => AppBuildResultCollection.cs} | 98 +-- ...ildResultData.cs => AppBuildResultData.cs} | 12 +- ...tResource.cs => AppBuildResultResource.cs} | 62 +- ...cs => AppBuildServiceAgentPoolResource.cs} | 70 +- ...uildServiceAgentPoolResourceCollection.cs} | 114 ++-- ...> AppBuildServiceAgentPoolResourceData.cs} | 12 +- ...ection.cs => AppBuildServiceCollection.cs} | 94 +-- ...dServiceData.cs => AppBuildServiceData.cs} | 12 +- ...Resource.cs => AppBuildServiceResource.cs} | 114 ++-- ...ilderResource.cs => AppBuilderResource.cs} | 84 +-- ...ion.cs => AppBuilderResourceCollection.cs} | 114 ++-- ...ourceData.cs => AppBuilderResourceData.cs} | 14 +- ...ntResource.cs => AppDeploymentResource.cs} | 162 ++--- ....cs => AppDeploymentResourceCollection.cs} | 110 ++-- ...ceData.cs => AppDeploymentResourceData.cs} | 12 +- .../src/Generated/AppResource.cs | 20 +- .../src/Generated/BuildpackBindingResource.cs | 2 +- .../BuildpackBindingResourceCollection.cs | 8 +- .../Extensions/AppPlatformExtensions.cs | 84 +-- ...ServiceAgentPoolResourceOperationSource.cs | 40 ++ ...s => AppBuilderResourceOperationSource.cs} | 16 +- .../AppDeploymentResourceOperationSource.cs | 40 ++ ...ServiceAgentPoolResourceOperationSource.cs | 40 -- .../BuilderResourceOperationSource.cs | 40 -- ... => ActiveDeploymentList.Serialization.cs} | 2 +- ...tCollection.cs => ActiveDeploymentList.cs} | 6 +- ...CustomDomainResourceList.Serialization.cs} | 6 +- ...s => ApiPortalCustomDomainResourceList.cs} | 10 +- ...=> ApiPortalResourceList.Serialization.cs} | 6 +- ...Collection.cs => ApiPortalResourceList.cs} | 10 +- ...ation.cs => AppBuildData.Serialization.cs} | 10 +- ...ation.cs => AppBuildList.Serialization.cs} | 12 +- .../{BuildCollection.cs => AppBuildList.cs} | 14 +- ...cs => AppBuildProperties.Serialization.cs} | 10 +- ...ildProperties.cs => AppBuildProperties.cs} | 12 +- .../Models/AppBuildProvisioningState.cs | 60 ++ ...cs => AppBuildResultData.Serialization.cs} | 6 +- ...cs => AppBuildResultList.Serialization.cs} | 12 +- ...ultCollection.cs => AppBuildResultList.cs} | 14 +- ...iceAgentPoolResourceData.Serialization.cs} | 6 +- ...s => AppBuildServiceData.Serialization.cs} | 6 +- .../AppBuildServiceList.Serialization.cs | 47 ++ ...ceCollection.cs => AppBuildServiceList.cs} | 14 +- ... => AppBuilderProperties.Serialization.cs} | 10 +- ...rProperties.cs => AppBuilderProperties.cs} | 12 +- .../Models/AppBuilderProvisioningState.cs | 60 ++ ...> AppBuilderResourceData.Serialization.cs} | 10 +- ...> AppBuilderResourceList.Serialization.cs} | 12 +- ...ollection.cs => AppBuilderResourceList.cs} | 14 +- ...ppDeploymentResourceData.Serialization.cs} | 6 +- ...on.cs => AppResourceList.Serialization.cs} | 6 +- ...sourceCollection.cs => AppResourceList.cs} | 10 +- ...s => BindingResourceList.Serialization.cs} | 6 +- ...ceCollection.cs => BindingResourceList.cs} | 10 +- ...BindingResourceProperties.Serialization.cs | 11 +- .../Models/BindingResourceProperties.cs | 4 +- .../Models/BuildProvisioningState.cs | 60 -- ...entPoolResourceCollection.Serialization.cs | 47 -- ...viceAgentPoolResourceList.Serialization.cs | 47 ++ ...s => BuildServiceAgentPoolResourceList.cs} | 14 +- .../Models/BuilderProvisioningState.cs | 60 -- ...BuilderResourceCollection.Serialization.cs | 47 -- ...dpackBindingResourceList.Serialization.cs} | 6 +- ...ion.cs => BuildpackBindingResourceList.cs} | 10 +- ... CertificateResourceList.Serialization.cs} | 6 +- ...llection.cs => CertificateResourceList.cs} | 10 +- ...ationServiceResourceList.Serialization.cs} | 6 +- ...cs => ConfigurationServiceResourceList.cs} | 10 +- ...CustomDomainResourceList.Serialization.cs} | 6 +- ...lection.cs => CustomDomainResourceList.cs} | 10 +- ...loymentResourceCollection.Serialization.cs | 47 -- .../DeploymentResourceList.Serialization.cs | 47 ++ ...ollection.cs => DeploymentResourceList.cs} | 14 +- ...CustomDomainResourceList.Serialization.cs} | 6 +- ....cs => GatewayCustomDomainResourceList.cs} | 10 +- ...s => GatewayResourceList.Serialization.cs} | 6 +- ...ceCollection.cs => GatewayResourceList.cs} | 10 +- ...yRouteConfigResourceList.Serialization.cs} | 6 +- ...n.cs => GatewayRouteConfigResourceList.cs} | 10 +- .../Models/ResourceSku.Serialization.cs | 17 +- .../src/Generated/Models/ResourceSku.cs | 8 +- ...on.cs => ResourceSkuList.Serialization.cs} | 6 +- ...rceSkuCollection.cs => ResourceSkuList.cs} | 10 +- ...viceRegistryResourceList.Serialization.cs} | 6 +- ...tion.cs => ServiceRegistryResourceList.cs} | 10 +- ...s => StorageResourceList.Serialization.cs} | 6 +- ...ceCollection.cs => StorageResourceList.cs} | 10 +- ... SupportedBuildpacksList.Serialization.cs} | 6 +- ...llection.cs => SupportedBuildpacksList.cs} | 10 +- ...s => SupportedStacksList.Serialization.cs} | 6 +- ...ksCollection.cs => SupportedStacksList.cs} | 10 +- .../ApiPortalCustomDomainsRestOperations.cs | 24 +- .../ApiPortalsRestOperations.cs | 24 +- .../RestOperations/AppsRestOperations.cs | 30 +- .../RestOperations/BindingsRestOperations.cs | 24 +- .../BuildServiceAgentPoolRestOperations.cs | 46 +- .../BuildServiceBuilderRestOperations.cs | 46 +- .../BuildServiceRestOperations.cs | 158 ++--- .../BuildpackBindingRestOperations.cs | 24 +- .../CertificatesRestOperations.cs | 24 +- .../ConfigurationServicesRestOperations.cs | 24 +- .../CustomDomainsRestOperations.cs | 24 +- .../DeploymentsRestOperations.cs | 76 +-- .../GatewayCustomDomainsRestOperations.cs | 24 +- .../GatewayRouteConfigsRestOperations.cs | 24 +- .../RestOperations/GatewaysRestOperations.cs | 24 +- .../ServiceRegistriesRestOperations.cs | 24 +- .../RestOperations/SkusRestOperations.cs | 24 +- .../RestOperations/StoragesRestOperations.cs | 24 +- .../src/Generated/ServiceResource.cs | 66 +- .../Generated/SupportedBuildpackResource.cs | 2 +- .../SupportedBuildpackResourceCollection.cs | 8 +- .../src/Generated/SupportedStackResource.cs | 2 +- .../SupportedStackResourceCollection.cs | 8 +- .../src/autorest.md | 42 ++ 119 files changed, 2043 insertions(+), 1991 deletions(-) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{BuildCollection.cs => AppBuildCollection.cs} (62%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{BuildData.cs => AppBuildData.cs} (57%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{BuildResource.cs => AppBuildResource.cs} (67%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{BuildResultCollection.cs => AppBuildResultCollection.cs} (57%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{BuildResultData.cs => AppBuildResultData.cs} (60%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{BuildResultResource.cs => AppBuildResultResource.cs} (67%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{BuildServiceAgentPoolResource.cs => AppBuildServiceAgentPoolResource.cs} (59%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{BuildServiceAgentPoolResourceCollection.cs => AppBuildServiceAgentPoolResourceCollection.cs} (56%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{BuildServiceAgentPoolResourceData.cs => AppBuildServiceAgentPoolResourceData.cs} (55%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{BuildServiceCollection.cs => AppBuildServiceCollection.cs} (58%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{BuildServiceData.cs => AppBuildServiceData.cs} (59%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{BuildServiceResource.cs => AppBuildServiceResource.cs} (72%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{BuilderResource.cs => AppBuilderResource.cs} (69%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{BuilderResourceCollection.cs => AppBuilderResourceCollection.cs} (59%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{BuilderResourceData.cs => AppBuilderResourceData.cs} (54%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{DeploymentResource.cs => AppDeploymentResource.cs} (68%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{DeploymentResourceCollection.cs => AppDeploymentResourceCollection.cs} (60%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{DeploymentResourceData.cs => AppDeploymentResourceData.cs} (63%) create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppBuildServiceAgentPoolResourceOperationSource.cs rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/{DeploymentResourceOperationSource.cs => AppBuilderResourceOperationSource.cs} (54%) create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppDeploymentResourceOperationSource.cs delete mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/BuildServiceAgentPoolResourceOperationSource.cs delete mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/BuilderResourceOperationSource.cs rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{ActiveDeploymentCollection.Serialization.cs => ActiveDeploymentList.Serialization.cs} (91%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{ActiveDeploymentCollection.cs => ActiveDeploymentList.cs} (84%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{ApiPortalCustomDomainResourceCollection.Serialization.cs => ApiPortalCustomDomainResourceList.Serialization.cs} (82%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{ApiPortalCustomDomainResourceCollection.cs => ApiPortalCustomDomainResourceList.cs} (80%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{ApiPortalResourceCollection.Serialization.cs => ApiPortalResourceList.Serialization.cs} (84%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{ApiPortalResourceCollection.cs => ApiPortalResourceList.cs} (83%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{BuildData.Serialization.cs => AppBuildData.Serialization.cs} (84%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{BuildCollection.Serialization.cs => AppBuildList.Serialization.cs} (73%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{BuildCollection.cs => AppBuildList.cs} (72%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{BuildProperties.Serialization.cs => AppBuildProperties.Serialization.cs} (88%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{BuildProperties.cs => AppBuildProperties.cs} (80%) create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildProvisioningState.cs rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{BuildResultData.Serialization.cs => AppBuildResultData.Serialization.cs} (89%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{BuildResultCollection.Serialization.cs => AppBuildResultList.Serialization.cs} (70%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{BuildResultCollection.cs => AppBuildResultList.cs} (71%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{BuildServiceAgentPoolResourceData.Serialization.cs => AppBuildServiceAgentPoolResourceData.Serialization.cs} (87%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{BuildServiceData.Serialization.cs => AppBuildServiceData.Serialization.cs} (89%) create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildServiceList.Serialization.cs rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{BuildServiceCollection.cs => AppBuildServiceList.cs} (71%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{BuilderProperties.Serialization.cs => AppBuilderProperties.Serialization.cs} (84%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{BuilderProperties.cs => AppBuilderProperties.cs} (69%) create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuilderProvisioningState.cs rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{BuilderResourceData.Serialization.cs => AppBuilderResourceData.Serialization.cs} (82%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{BuildServiceCollection.Serialization.cs => AppBuilderResourceList.Serialization.cs} (70%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{BuilderResourceCollection.cs => AppBuilderResourceList.cs} (70%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{DeploymentResourceData.Serialization.cs => AppDeploymentResourceData.Serialization.cs} (90%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{AppResourceCollection.Serialization.cs => AppResourceList.Serialization.cs} (85%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{AppResourceCollection.cs => AppResourceList.cs} (77%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{BindingResourceCollection.Serialization.cs => BindingResourceList.Serialization.cs} (84%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{BindingResourceCollection.cs => BindingResourceList.cs} (84%) delete mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildProvisioningState.cs delete mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceList.Serialization.cs rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{BuildServiceAgentPoolResourceCollection.cs => BuildServiceAgentPoolResourceList.cs} (71%) delete mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderProvisioningState.cs delete mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderResourceCollection.Serialization.cs rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{BuildpackBindingResourceCollection.Serialization.cs => BuildpackBindingResourceList.Serialization.cs} (83%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{BuildpackBindingResourceCollection.cs => BuildpackBindingResourceList.cs} (81%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{CertificateResourceCollection.Serialization.cs => CertificateResourceList.Serialization.cs} (84%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{CertificateResourceCollection.cs => CertificateResourceList.cs} (80%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{ConfigurationServiceResourceCollection.Serialization.cs => ConfigurationServiceResourceList.Serialization.cs} (82%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{ConfigurationServiceResourceCollection.cs => ConfigurationServiceResourceList.cs} (81%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{CustomDomainResourceCollection.Serialization.cs => CustomDomainResourceList.Serialization.cs} (84%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{CustomDomainResourceCollection.cs => CustomDomainResourceList.cs} (80%) delete mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceCollection.Serialization.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceList.Serialization.cs rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{DeploymentResourceCollection.cs => DeploymentResourceList.cs} (74%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{GatewayCustomDomainResourceCollection.Serialization.cs => GatewayCustomDomainResourceList.Serialization.cs} (83%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{GatewayCustomDomainResourceCollection.cs => GatewayCustomDomainResourceList.cs} (81%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{GatewayResourceCollection.Serialization.cs => GatewayResourceList.Serialization.cs} (84%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{GatewayResourceCollection.cs => GatewayResourceList.cs} (84%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{GatewayRouteConfigResourceCollection.Serialization.cs => GatewayRouteConfigResourceList.Serialization.cs} (83%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{GatewayRouteConfigResourceCollection.cs => GatewayRouteConfigResourceList.cs} (81%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{ResourceSkuCollection.Serialization.cs => ResourceSkuList.Serialization.cs} (84%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{ResourceSkuCollection.cs => ResourceSkuList.cs} (76%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{ServiceRegistryResourceCollection.Serialization.cs => ServiceRegistryResourceList.Serialization.cs} (83%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{ServiceRegistryResourceCollection.cs => ServiceRegistryResourceList.cs} (82%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{StorageResourceCollection.Serialization.cs => StorageResourceList.Serialization.cs} (84%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{StorageResourceCollection.cs => StorageResourceList.cs} (81%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{SupportedBuildpacksCollection.Serialization.cs => SupportedBuildpacksList.Serialization.cs} (84%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{SupportedBuildpacksCollection.cs => SupportedBuildpacksList.cs} (83%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{SupportedStacksCollection.Serialization.cs => SupportedStacksList.Serialization.cs} (85%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{SupportedStacksCollection.cs => SupportedStacksList.cs} (84%) 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 0b324f2d68309..35598244d3f3c 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 @@ -74,25 +74,253 @@ public ApiPortalResourceData() { } public Azure.ResourceManager.AppPlatform.Models.ApiPortalProperties Properties { get { throw null; } set { } } public Azure.ResourceManager.AppPlatform.Models.AppPlatformSku Sku { get { throw null; } set { } } } + public partial class AppBuildCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AppBuildCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string buildName, Azure.ResourceManager.AppPlatform.AppBuildData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string buildName, Azure.ResourceManager.AppPlatform.AppBuildData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string buildName, 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 buildName, 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 AppBuildData : Azure.ResourceManager.Models.ResourceData + { + public AppBuildData() { } + public Azure.ResourceManager.AppPlatform.Models.AppBuildProperties Properties { get { throw null; } set { } } + } + public partial class AppBuilderResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AppBuilderResource() { } + public virtual Azure.ResourceManager.AppPlatform.AppBuilderResourceData 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 builderName) { 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 GetBuildpackBindingResource(string buildpackBindingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBuildpackBindingResourceAsync(string buildpackBindingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.BuildpackBindingResourceCollection GetBuildpackBindingResources() { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.AppBuilderResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.AppBuilderResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class AppBuilderResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AppBuilderResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string builderName, Azure.ResourceManager.AppPlatform.AppBuilderResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string builderName, Azure.ResourceManager.AppPlatform.AppBuilderResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string builderName, 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 builderName, 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 AppBuilderResourceData : Azure.ResourceManager.Models.ResourceData + { + public AppBuilderResourceData() { } + public Azure.ResourceManager.AppPlatform.Models.AppBuilderProperties Properties { get { throw null; } set { } } + } + public partial class AppBuildResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AppBuildResource() { } + public virtual Azure.ResourceManager.AppPlatform.AppBuildData 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.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAppBuildResult(string buildResultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAppBuildResultAsync(string buildResultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.AppBuildResultCollection GetAppBuildResults() { 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.AppBuildData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.AppBuildData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class AppBuildResultCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AppBuildResultCollection() { } + public virtual Azure.Response Exists(string buildResultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string buildResultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string buildResultName, 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 buildResultName, 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 AppBuildResultData : Azure.ResourceManager.Models.ResourceData + { + public AppBuildResultData() { } + public Azure.ResourceManager.AppPlatform.Models.BuildResultProperties Properties { get { throw null; } set { } } + } + public partial class AppBuildResultResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AppBuildResultResource() { } + public virtual Azure.ResourceManager.AppPlatform.AppBuildResultData 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, string buildResultName) { 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 GetBuildResultLog(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBuildResultLogAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class AppBuildServiceAgentPoolResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AppBuildServiceAgentPoolResource() { } + public virtual Azure.ResourceManager.AppPlatform.AppBuildServiceAgentPoolResourceData 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 agentPoolName) { 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.AppBuildServiceAgentPoolResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.AppBuildServiceAgentPoolResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class AppBuildServiceAgentPoolResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AppBuildServiceAgentPoolResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string agentPoolName, Azure.ResourceManager.AppPlatform.AppBuildServiceAgentPoolResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string agentPoolName, Azure.ResourceManager.AppPlatform.AppBuildServiceAgentPoolResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string agentPoolName, 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 agentPoolName, 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 AppBuildServiceAgentPoolResourceData : Azure.ResourceManager.Models.ResourceData + { + public AppBuildServiceAgentPoolResourceData() { } + public Azure.ResourceManager.AppPlatform.Models.BuildServiceAgentPoolProperties Properties { get { throw null; } set { } } + } + public partial class AppBuildServiceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AppBuildServiceCollection() { } + 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; } + 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 buildServiceName, 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 AppBuildServiceData : Azure.ResourceManager.Models.ResourceData + { + public AppBuildServiceData() { } + public Azure.ResourceManager.AppPlatform.Models.BuildServiceProperties Properties { get { throw null; } set { } } + } + public partial class AppBuildServiceResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AppBuildServiceResource() { } + public virtual Azure.ResourceManager.AppPlatform.AppBuildServiceData 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) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAppBuild(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAppBuildAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAppBuilderResource(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAppBuilderResourceAsync(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.AppBuilderResourceCollection GetAppBuilderResources() { throw null; } + public virtual Azure.ResourceManager.AppPlatform.AppBuildCollection GetAppBuilds() { throw null; } + public virtual Azure.Response GetAppBuildServiceAgentPoolResource(string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAppBuildServiceAgentPoolResourceAsync(string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.AppBuildServiceAgentPoolResourceCollection GetAppBuildServiceAgentPoolResources() { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetResourceUploadUrl(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetResourceUploadUrlAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSupportedBuildpackResource(string buildpackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSupportedBuildpackResourceAsync(string buildpackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.SupportedBuildpackResourceCollection GetSupportedBuildpackResources() { throw null; } + public virtual Azure.Response GetSupportedStackResource(string stackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSupportedStackResourceAsync(string stackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.SupportedStackResourceCollection GetSupportedStackResources() { throw null; } + } + public partial class AppDeploymentResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AppDeploymentResource() { } + public virtual Azure.ResourceManager.AppPlatform.AppDeploymentResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName) { 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.ResourceManager.ArmOperation GenerateHeapDump(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GenerateHeapDumpAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation GenerateThreadDump(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GenerateThreadDumpAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, 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 GetLogFileUrl(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetLogFileUrlAsync(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 Start(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation StartJFR(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartJFRAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Stop(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StopAsync(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.AppDeploymentResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.AppDeploymentResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class AppDeploymentResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AppDeploymentResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string deploymentName, Azure.ResourceManager.AppPlatform.AppDeploymentResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string deploymentName, Azure.ResourceManager.AppPlatform.AppDeploymentResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Collections.Generic.IEnumerable version = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Collections.Generic.IEnumerable version = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string deploymentName, 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 AppDeploymentResourceData : Azure.ResourceManager.Models.ResourceData + { + public AppDeploymentResourceData() { } + public Azure.ResourceManager.AppPlatform.Models.DeploymentResourceProperties Properties { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.AppPlatformSku Sku { get { throw null; } set { } } + } public static partial class AppPlatformExtensions { public static Azure.Response CheckServiceNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.AppPlatform.Models.CheckNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> CheckServiceNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.AppPlatform.Models.CheckNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.AppPlatform.ApiPortalCustomDomainResource GetApiPortalCustomDomainResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.ApiPortalResource GetApiPortalResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.AppBuilderResource GetAppBuilderResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.AppBuildResource GetAppBuildResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.AppBuildResultResource GetAppBuildResultResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.AppBuildServiceAgentPoolResource GetAppBuildServiceAgentPoolResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.AppBuildServiceResource GetAppBuildServiceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.AppDeploymentResource GetAppDeploymentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.AppResource GetAppResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.BindingResource GetBindingResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.AppPlatform.BuilderResource GetBuilderResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.BuildpackBindingResource GetBuildpackBindingResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.AppPlatform.BuildResource GetBuildResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.AppPlatform.BuildResultResource GetBuildResultResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.AppPlatform.BuildServiceAgentPoolResource GetBuildServiceAgentPoolResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.AppPlatform.BuildServiceResource GetBuildServiceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.CertificateResource GetCertificateResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.ConfigServerResource GetConfigServerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.ConfigurationServiceResource GetConfigurationServiceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.CustomDomainResource GetCustomDomainResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.AppPlatform.DeploymentResource GetDeploymentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.GatewayCustomDomainResource GetGatewayCustomDomainResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.GatewayResource GetGatewayResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.GatewayRouteConfigResource GetGatewayRouteConfigResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -122,6 +350,9 @@ protected AppResource() { } 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(string syncStatus = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAppDeploymentResource(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAppDeploymentResourceAsync(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.AppDeploymentResourceCollection GetAppDeploymentResources() { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string syncStatus = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetBindingResource(string bindingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetBindingResourceAsync(string bindingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -129,13 +360,10 @@ protected AppResource() { } public virtual Azure.Response GetCustomDomainResource(string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetCustomDomainResourceAsync(string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppPlatform.CustomDomainResourceCollection GetCustomDomainResources() { throw null; } - public virtual Azure.Response GetDeploymentResource(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetDeploymentResourceAsync(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.AppPlatform.DeploymentResourceCollection GetDeploymentResources() { throw null; } public virtual Azure.Response GetResourceUploadUrl(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetResourceUploadUrlAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation SetActiveDeployments(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.ActiveDeploymentCollection activeDeploymentCollection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetActiveDeploymentsAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.ActiveDeploymentCollection activeDeploymentCollection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation SetActiveDeployments(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.ActiveDeploymentList activeDeploymentCollection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetActiveDeploymentsAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.ActiveDeploymentList activeDeploymentCollection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.AppResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.AppResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response ValidateDomain(Azure.ResourceManager.AppPlatform.Models.CustomDomainValidatePayload validatePayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -197,63 +425,6 @@ public partial class BindingResourceData : Azure.ResourceManager.Models.Resource public BindingResourceData() { } public Azure.ResourceManager.AppPlatform.Models.BindingResourceProperties Properties { get { throw null; } set { } } } - public partial class BuildCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected BuildCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string buildName, Azure.ResourceManager.AppPlatform.BuildData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string buildName, Azure.ResourceManager.AppPlatform.BuildData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string buildName, 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 buildName, 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 BuildData : Azure.ResourceManager.Models.ResourceData - { - public BuildData() { } - public Azure.ResourceManager.AppPlatform.Models.BuildProperties Properties { get { throw null; } set { } } - } - public partial class BuilderResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected BuilderResource() { } - public virtual Azure.ResourceManager.AppPlatform.BuilderResourceData 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 builderName) { 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 GetBuildpackBindingResource(string buildpackBindingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetBuildpackBindingResourceAsync(string buildpackBindingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.AppPlatform.BuildpackBindingResourceCollection GetBuildpackBindingResources() { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.BuilderResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.BuilderResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class BuilderResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected BuilderResourceCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string builderName, Azure.ResourceManager.AppPlatform.BuilderResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string builderName, Azure.ResourceManager.AppPlatform.BuilderResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string builderName, 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 builderName, 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 BuilderResourceData : Azure.ResourceManager.Models.ResourceData - { - public BuilderResourceData() { } - public Azure.ResourceManager.AppPlatform.Models.BuilderProperties Properties { get { throw null; } set { } } - } public partial class BuildpackBindingResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; @@ -288,128 +459,6 @@ public partial class BuildpackBindingResourceData : Azure.ResourceManager.Models public BuildpackBindingResourceData() { } public Azure.ResourceManager.AppPlatform.Models.BuildpackBindingProperties Properties { get { throw null; } set { } } } - public partial class BuildResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected BuildResource() { } - public virtual Azure.ResourceManager.AppPlatform.BuildData 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.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 GetBuildResult(string buildResultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetBuildResultAsync(string buildResultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.AppPlatform.BuildResultCollection GetBuildResults() { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.BuildData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.BuildData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class BuildResultCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected BuildResultCollection() { } - public virtual Azure.Response Exists(string buildResultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string buildResultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string buildResultName, 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 buildResultName, 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 BuildResultData : Azure.ResourceManager.Models.ResourceData - { - public BuildResultData() { } - public Azure.ResourceManager.AppPlatform.Models.BuildResultProperties Properties { get { throw null; } set { } } - } - public partial class BuildResultResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected BuildResultResource() { } - public virtual Azure.ResourceManager.AppPlatform.BuildResultData 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, string buildResultName) { 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 GetBuildResultLog(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetBuildResultLogAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class BuildServiceAgentPoolResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected BuildServiceAgentPoolResource() { } - public virtual Azure.ResourceManager.AppPlatform.BuildServiceAgentPoolResourceData 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 agentPoolName) { 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.BuildServiceAgentPoolResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.BuildServiceAgentPoolResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class BuildServiceAgentPoolResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected BuildServiceAgentPoolResourceCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string agentPoolName, Azure.ResourceManager.AppPlatform.BuildServiceAgentPoolResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string agentPoolName, Azure.ResourceManager.AppPlatform.BuildServiceAgentPoolResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string agentPoolName, 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 agentPoolName, 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 BuildServiceAgentPoolResourceData : Azure.ResourceManager.Models.ResourceData - { - public BuildServiceAgentPoolResourceData() { } - public Azure.ResourceManager.AppPlatform.Models.BuildServiceAgentPoolProperties Properties { get { throw null; } set { } } - } - public partial class BuildServiceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected BuildServiceCollection() { } - 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; } - 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 buildServiceName, 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 BuildServiceData : Azure.ResourceManager.Models.ResourceData - { - public BuildServiceData() { } - public Azure.ResourceManager.AppPlatform.Models.BuildServiceProperties Properties { get { throw null; } set { } } - } - public partial class BuildServiceResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected BuildServiceResource() { } - public virtual Azure.ResourceManager.AppPlatform.BuildServiceData 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) { 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 GetBuild(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetBuildAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetBuilderResource(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetBuilderResourceAsync(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.AppPlatform.BuilderResourceCollection GetBuilderResources() { throw null; } - public virtual Azure.ResourceManager.AppPlatform.BuildCollection GetBuilds() { throw null; } - public virtual Azure.Response GetBuildServiceAgentPoolResource(string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetBuildServiceAgentPoolResourceAsync(string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.AppPlatform.BuildServiceAgentPoolResourceCollection GetBuildServiceAgentPoolResources() { throw null; } - public virtual Azure.Response GetResourceUploadUrl(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetResourceUploadUrlAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetSupportedBuildpackResource(string buildpackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetSupportedBuildpackResourceAsync(string buildpackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.AppPlatform.SupportedBuildpackResourceCollection GetSupportedBuildpackResources() { throw null; } - public virtual Azure.Response GetSupportedStackResource(string stackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetSupportedStackResourceAsync(string stackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.AppPlatform.SupportedStackResourceCollection GetSupportedStackResources() { throw null; } - } public partial class CertificateResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; @@ -533,55 +582,6 @@ public partial class CustomDomainResourceData : Azure.ResourceManager.Models.Res public CustomDomainResourceData() { } public Azure.ResourceManager.AppPlatform.Models.CustomDomainProperties Properties { get { throw null; } set { } } } - public partial class DeploymentResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected DeploymentResource() { } - public virtual Azure.ResourceManager.AppPlatform.DeploymentResourceData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName) { 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.ResourceManager.ArmOperation GenerateHeapDump(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GenerateHeapDumpAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation GenerateThreadDump(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GenerateThreadDumpAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, 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 GetLogFileUrl(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetLogFileUrlAsync(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 Start(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StartAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation StartJFR(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StartJFRAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Stop(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StopAsync(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.DeploymentResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.DeploymentResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class DeploymentResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected DeploymentResourceCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string deploymentName, Azure.ResourceManager.AppPlatform.DeploymentResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string deploymentName, Azure.ResourceManager.AppPlatform.DeploymentResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Collections.Generic.IEnumerable version = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Collections.Generic.IEnumerable version = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string deploymentName, 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 DeploymentResourceData : Azure.ResourceManager.Models.ResourceData - { - public DeploymentResourceData() { } - public Azure.ResourceManager.AppPlatform.Models.DeploymentResourceProperties Properties { get { throw null; } set { } } - public Azure.ResourceManager.AppPlatform.Models.AppPlatformSku Sku { get { throw null; } set { } } - } public partial class GatewayCustomDomainResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; @@ -765,13 +765,13 @@ protected ServiceResource() { } public virtual Azure.Response GetApiPortalResource(string apiPortalName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetApiPortalResourceAsync(string apiPortalName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppPlatform.ApiPortalResourceCollection GetApiPortalResources() { throw null; } + public virtual Azure.Response GetAppBuildService(string buildServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAppBuildServiceAsync(string buildServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.AppBuildServiceCollection GetAppBuildServices() { throw null; } public virtual Azure.Response GetAppResource(string appName, string syncStatus = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAppResourceAsync(string appName, string syncStatus = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppPlatform.AppResourceCollection GetAppResources() { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetBuildService(string buildServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetBuildServiceAsync(string buildServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.AppPlatform.BuildServiceCollection GetBuildServices() { throw null; } public virtual Azure.Response GetCertificateResource(string certificateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetCertificateResourceAsync(string certificateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppPlatform.CertificateResourceCollection GetCertificateResources() { throw null; } @@ -779,8 +779,8 @@ protected ServiceResource() { } public virtual Azure.Response GetConfigurationServiceResource(string configurationServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetConfigurationServiceResourceAsync(string configurationServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppPlatform.ConfigurationServiceResourceCollection GetConfigurationServiceResources() { throw null; } - public virtual Azure.Pageable GetForClusterDeployments(System.Collections.Generic.IEnumerable version = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetForClusterDeploymentsAsync(System.Collections.Generic.IEnumerable version = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetForClusterDeployments(System.Collections.Generic.IEnumerable version = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetForClusterDeploymentsAsync(System.Collections.Generic.IEnumerable version = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetGatewayResource(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetGatewayResourceAsync(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppPlatform.GatewayResourceCollection GetGatewayResources() { throw null; } @@ -922,9 +922,9 @@ public SupportedStackResourceData() { } } namespace Azure.ResourceManager.AppPlatform.Models { - public partial class ActiveDeploymentCollection + public partial class ActiveDeploymentList { - public ActiveDeploymentCollection() { } + public ActiveDeploymentList() { } public System.Collections.Generic.IList ActiveDeploymentNames { get { throw null; } } } public partial class ApiPortalInstance @@ -973,6 +973,65 @@ internal ApiPortalResourceRequests() { } public string Cpu { get { throw null; } } public string Memory { get { throw null; } } } + public partial class AppBuilderProperties + { + public AppBuilderProperties() { } + public System.Collections.Generic.IList BuildpackGroups { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.AppBuilderProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.StackProperties Stack { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AppBuilderProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AppBuilderProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.AppBuilderProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.AppBuilderProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.AppBuilderProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.AppBuilderProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.AppBuilderProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.AppBuilderProvisioningState 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.AppBuilderProvisioningState left, Azure.ResourceManager.AppPlatform.Models.AppBuilderProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.AppBuilderProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.AppBuilderProvisioningState left, Azure.ResourceManager.AppPlatform.Models.AppBuilderProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AppBuildProperties + { + public AppBuildProperties() { } + public string AgentPool { get { throw null; } set { } } + public string Builder { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Env { get { throw null; } } + public Azure.ResourceManager.AppPlatform.Models.AppBuildProvisioningState? ProvisioningState { get { throw null; } } + public string RelativePath { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier TriggeredBuildResultId { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AppBuildProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AppBuildProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppPlatform.Models.AppBuildProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.AppBuildProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.AppBuildProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.AppBuildProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.AppBuildProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppPlatform.Models.AppBuildProvisioningState 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.AppBuildProvisioningState left, Azure.ResourceManager.AppPlatform.Models.AppBuildProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppPlatform.Models.AppBuildProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.AppBuildProvisioningState left, Azure.ResourceManager.AppPlatform.Models.AppBuildProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } public partial class AppPlatformSku { public AppPlatformSku() { } @@ -1030,7 +1089,7 @@ public BindingResourceProperties() { } public string Key { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } public string ResourceName { get { throw null; } } - public string ResourceType { get { throw null; } } + public Azure.Core.ResourceType? ResourceType { get { throw null; } } public string UpdatedAt { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -1055,34 +1114,6 @@ public BindingResourceProperties() { } public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.BindingType left, Azure.ResourceManager.AppPlatform.Models.BindingType right) { throw null; } public override string ToString() { throw null; } } - public partial class BuilderProperties - { - public BuilderProperties() { } - public System.Collections.Generic.IList BuildpackGroups { get { throw null; } } - public Azure.ResourceManager.AppPlatform.Models.BuilderProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.AppPlatform.Models.StackProperties Stack { get { throw null; } set { } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct BuilderProvisioningState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public BuilderProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.AppPlatform.Models.BuilderProvisioningState Creating { get { throw null; } } - public static Azure.ResourceManager.AppPlatform.Models.BuilderProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.AppPlatform.Models.BuilderProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.AppPlatform.Models.BuilderProvisioningState Succeeded { get { throw null; } } - public static Azure.ResourceManager.AppPlatform.Models.BuilderProvisioningState Updating { get { throw null; } } - public bool Equals(Azure.ResourceManager.AppPlatform.Models.BuilderProvisioningState 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.BuilderProvisioningState left, Azure.ResourceManager.AppPlatform.Models.BuilderProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.AppPlatform.Models.BuilderProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.BuilderProvisioningState left, Azure.ResourceManager.AppPlatform.Models.BuilderProvisioningState right) { throw null; } - public override string ToString() { throw null; } - } public partial class BuildpackBindingLaunchProperties { public BuildpackBindingLaunchProperties() { } @@ -1123,37 +1154,6 @@ public BuildpacksGroupProperties() { } public System.Collections.Generic.IList Buildpacks { get { throw null; } } public string Name { get { throw null; } set { } } } - public partial class BuildProperties - { - public BuildProperties() { } - public string AgentPool { get { throw null; } set { } } - public string Builder { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Env { get { throw null; } } - public Azure.ResourceManager.AppPlatform.Models.BuildProvisioningState? ProvisioningState { get { throw null; } } - public string RelativePath { get { throw null; } set { } } - public Azure.Core.ResourceIdentifier TriggeredBuildResultId { get { throw null; } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct BuildProvisioningState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public BuildProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.AppPlatform.Models.BuildProvisioningState Creating { get { throw null; } } - public static Azure.ResourceManager.AppPlatform.Models.BuildProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.AppPlatform.Models.BuildProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.AppPlatform.Models.BuildProvisioningState Succeeded { get { throw null; } } - public static Azure.ResourceManager.AppPlatform.Models.BuildProvisioningState Updating { get { throw null; } } - public bool Equals(Azure.ResourceManager.AppPlatform.Models.BuildProvisioningState 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.BuildProvisioningState left, Azure.ResourceManager.AppPlatform.Models.BuildProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.AppPlatform.Models.BuildProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.BuildProvisioningState left, Azure.ResourceManager.AppPlatform.Models.BuildProvisioningState right) { throw null; } - public override string ToString() { throw null; } - } public partial class BuildResultLog { internal BuildResultLog() { } @@ -1833,9 +1833,9 @@ public partial class ResourceSku internal ResourceSku() { } public Azure.ResourceManager.AppPlatform.Models.SkuCapacity Capacity { get { throw null; } } public System.Collections.Generic.IReadOnlyList LocationInfo { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Locations { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Locations { get { throw null; } } public string Name { get { throw null; } } - public string ResourceType { get { throw null; } } + public Azure.Core.ResourceType? ResourceType { get { throw null; } } public System.Collections.Generic.IReadOnlyList Restrictions { get { throw null; } } public string Tier { get { throw null; } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildCollection.cs similarity index 62% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildCollection.cs index a013e33aa1c1a..1102ff3669599 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildCollection.cs @@ -20,28 +20,28 @@ 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 GetBuilds method from an instance of . + /// 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 GetAppBuilds method from an instance of . /// - public partial class BuildCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class AppBuildCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _buildBuildServiceClientDiagnostics; - private readonly BuildServiceRestOperations _buildBuildServiceRestClient; + private readonly ClientDiagnostics _appBuildBuildServiceClientDiagnostics; + private readonly BuildServiceRestOperations _appBuildBuildServiceRestClient; - /// Initializes a new instance of the class for mocking. - protected BuildCollection() + /// Initializes a new instance of the class for mocking. + protected AppBuildCollection() { } - /// Initializes a new instance of the class. + /// 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 BuildCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal AppBuildCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _buildBuildServiceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", BuildResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(BuildResource.ResourceType, out string buildBuildServiceApiVersion); - _buildBuildServiceRestClient = new BuildServiceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, buildBuildServiceApiVersion); + _appBuildBuildServiceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", AppBuildResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AppBuildResource.ResourceType, out string appBuildBuildServiceApiVersion); + _appBuildBuildServiceRestClient = new BuildServiceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appBuildBuildServiceApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -49,8 +49,8 @@ internal BuildCollection(ArmClient client, ResourceIdentifier id) : base(client, internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != BuildServiceResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, BuildServiceResource.ResourceType), nameof(id)); + if (id.ResourceType != AppBuildServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AppBuildServiceResource.ResourceType), nameof(id)); } /// @@ -64,17 +64,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// 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 buildName, BuildData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string buildName, AppBuildData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildCollection.CreateOrUpdate"); + using var scope = _appBuildBuildServiceClientDiagnostics.CreateScope("AppBuildCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _buildBuildServiceRestClient.CreateOrUpdateBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, buildName, data, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(Response.FromValue(new BuildResource(Client, response), response.GetRawResponse())); + var response = await _appBuildBuildServiceRestClient.CreateOrUpdateBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, buildName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(Response.FromValue(new AppBuildResource(Client, response), response.GetRawResponse())); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -97,17 +97,17 @@ public virtual async Task> CreateOrUpdateAsync(WaitU /// 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 buildName, BuildData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string buildName, AppBuildData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildCollection.CreateOrUpdate"); + using var scope = _appBuildBuildServiceClientDiagnostics.CreateScope("AppBuildCollection.CreateOrUpdate"); scope.Start(); try { - var response = _buildBuildServiceRestClient.CreateOrUpdateBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, buildName, data, cancellationToken); - var operation = new AppPlatformArmOperation(Response.FromValue(new BuildResource(Client, response), response.GetRawResponse())); + var response = _appBuildBuildServiceRestClient.CreateOrUpdateBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, buildName, data, cancellationToken); + var operation = new AppPlatformArmOperation(Response.FromValue(new AppBuildResource(Client, response), response.GetRawResponse())); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -128,18 +128,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, s /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string buildName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string buildName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); - using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildCollection.Get"); + using var scope = _appBuildBuildServiceClientDiagnostics.CreateScope("AppBuildCollection.Get"); scope.Start(); try { - var response = await _buildBuildServiceRestClient.GetBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, buildName, cancellationToken).ConfigureAwait(false); + var response = await _appBuildBuildServiceRestClient.GetBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, buildName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new BuildResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppBuildResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -157,18 +157,18 @@ public virtual async Task> GetAsync(string buildName, Ca /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string buildName, CancellationToken cancellationToken = default) + public virtual Response Get(string buildName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); - using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildCollection.Get"); + using var scope = _appBuildBuildServiceClientDiagnostics.CreateScope("AppBuildCollection.Get"); scope.Start(); try { - var response = _buildBuildServiceRestClient.GetBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, buildName, cancellationToken); + var response = _appBuildBuildServiceRestClient.GetBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, buildName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new BuildResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppBuildResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -183,17 +183,17 @@ public virtual Response Get(string buildName, CancellationToken c /// Operation Id: BuildService_ListBuilds /// /// 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) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { - using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildCollection.GetAll"); + using var scope = _appBuildBuildServiceClientDiagnostics.CreateScope("AppBuildCollection.GetAll"); scope.Start(); try { - var response = await _buildBuildServiceRestClient.ListBuildsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new BuildResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = await _appBuildBuildServiceRestClient.ListBuildsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new AppBuildResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -201,14 +201,14 @@ async Task> FirstPageFunc(int? pageSizeHint) throw; } } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) + async Task> NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildCollection.GetAll"); + using var scope = _appBuildBuildServiceClientDiagnostics.CreateScope("AppBuildCollection.GetAll"); scope.Start(); try { - var response = await _buildBuildServiceRestClient.ListBuildsNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new BuildResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = await _appBuildBuildServiceRestClient.ListBuildsNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new AppBuildResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -225,17 +225,17 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint) /// Operation Id: BuildService_ListBuilds /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { - using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildCollection.GetAll"); + using var scope = _appBuildBuildServiceClientDiagnostics.CreateScope("AppBuildCollection.GetAll"); scope.Start(); try { - var response = _buildBuildServiceRestClient.ListBuilds(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new BuildResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = _appBuildBuildServiceRestClient.ListBuilds(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AppBuildResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -243,14 +243,14 @@ Page FirstPageFunc(int? pageSizeHint) throw; } } - Page NextPageFunc(string nextLink, int? pageSizeHint) + Page NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildCollection.GetAll"); + using var scope = _appBuildBuildServiceClientDiagnostics.CreateScope("AppBuildCollection.GetAll"); scope.Start(); try { - var response = _buildBuildServiceRestClient.ListBuildsNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new BuildResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = _appBuildBuildServiceRestClient.ListBuildsNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AppBuildResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -274,11 +274,11 @@ public virtual async Task> ExistsAsync(string buildName, Cancella { Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); - using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildCollection.Exists"); + using var scope = _appBuildBuildServiceClientDiagnostics.CreateScope("AppBuildCollection.Exists"); scope.Start(); try { - var response = await _buildBuildServiceRestClient.GetBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, buildName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _appBuildBuildServiceRestClient.GetBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, buildName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -301,11 +301,11 @@ public virtual Response Exists(string buildName, CancellationToken cancell { Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); - using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildCollection.Exists"); + using var scope = _appBuildBuildServiceClientDiagnostics.CreateScope("AppBuildCollection.Exists"); scope.Start(); try { - var response = _buildBuildServiceRestClient.GetBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, buildName, cancellationToken: cancellationToken); + var response = _appBuildBuildServiceRestClient.GetBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, buildName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -315,7 +315,7 @@ public virtual Response Exists(string buildName, CancellationToken cancell } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -325,7 +325,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildData.cs similarity index 57% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildData.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildData.cs index 4bbd2a47a421f..1a114e66b4b93 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildData.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildData.cs @@ -11,26 +11,26 @@ namespace Azure.ResourceManager.AppPlatform { - /// A class representing the Build data model. - public partial class BuildData : ResourceData + /// A class representing the AppBuild data model. + public partial class AppBuildData : ResourceData { - /// Initializes a new instance of BuildData. - public BuildData() + /// Initializes a new instance of AppBuildData. + public AppBuildData() { } - /// Initializes a new instance of BuildData. + /// Initializes a new instance of AppBuildData. /// The id. /// The name. /// The resourceType. /// The systemData. /// Properties of the build resource. - internal BuildData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, BuildProperties properties) : base(id, name, resourceType, systemData) + internal AppBuildData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AppBuildProperties properties) : base(id, name, resourceType, systemData) { Properties = properties; } /// Properties of the build resource. - public BuildProperties Properties { get; set; } + public AppBuildProperties Properties { get; set; } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildResource.cs similarity index 67% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildResource.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildResource.cs index ac1364af5f9e4..7ad4bd2496573 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildResource.cs @@ -17,46 +17,46 @@ namespace Azure.ResourceManager.AppPlatform { /// - /// A Class representing a Build 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 GetBuildResource method. - /// Otherwise you can get one from its parent resource using the GetBuild method. + /// A Class representing an AppBuild 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 GetAppBuildResource method. + /// Otherwise you can get one from its parent resource using the GetAppBuild method. /// - public partial class BuildResource : ArmResource + public partial class AppBuildResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _buildBuildServiceClientDiagnostics; - private readonly BuildServiceRestOperations _buildBuildServiceRestClient; - private readonly BuildData _data; + private readonly ClientDiagnostics _appBuildBuildServiceClientDiagnostics; + private readonly BuildServiceRestOperations _appBuildBuildServiceRestClient; + private readonly AppBuildData _data; - /// Initializes a new instance of the class for mocking. - protected BuildResource() + /// Initializes a new instance of the class for mocking. + protected AppBuildResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal BuildResource(ArmClient client, BuildData data) : this(client, data.Id) + internal AppBuildResource(ArmClient client, AppBuildData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// 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 BuildResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal AppBuildResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _buildBuildServiceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string buildBuildServiceApiVersion); - _buildBuildServiceRestClient = new BuildServiceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, buildBuildServiceApiVersion); + _appBuildBuildServiceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string appBuildBuildServiceApiVersion); + _appBuildBuildServiceRestClient = new BuildServiceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appBuildBuildServiceApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -70,7 +70,7 @@ internal BuildResource(ArmClient client, ResourceIdentifier id) : base(client, i /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual BuildData Data + public virtual AppBuildData Data { get { @@ -86,11 +86,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets a collection of BuildResultResources in the Build. - /// An object representing collection of BuildResultResources and their operations over a BuildResultResource. - public virtual BuildResultCollection GetBuildResults() + /// Gets a collection of AppBuildResultResources in the AppBuild. + /// An object representing collection of AppBuildResultResources and their operations over a AppBuildResultResource. + public virtual AppBuildResultCollection GetAppBuildResults() { - return GetCachedClient(Client => new BuildResultCollection(Client, Id)); + return GetCachedClient(Client => new AppBuildResultCollection(Client, Id)); } /// @@ -103,9 +103,9 @@ public virtual BuildResultCollection GetBuildResults() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetBuildResultAsync(string buildResultName, CancellationToken cancellationToken = default) + public virtual async Task> GetAppBuildResultAsync(string buildResultName, CancellationToken cancellationToken = default) { - return await GetBuildResults().GetAsync(buildResultName, cancellationToken).ConfigureAwait(false); + return await GetAppBuildResults().GetAsync(buildResultName, cancellationToken).ConfigureAwait(false); } /// @@ -118,9 +118,9 @@ public virtual async Task> GetBuildResultAsync(str /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetBuildResult(string buildResultName, CancellationToken cancellationToken = default) + public virtual Response GetAppBuildResult(string buildResultName, CancellationToken cancellationToken = default) { - return GetBuildResults().Get(buildResultName, cancellationToken); + return GetAppBuildResults().Get(buildResultName, cancellationToken); } /// @@ -129,16 +129,16 @@ public virtual Response GetBuildResult(string buildResultNa /// Operation Id: BuildService_GetBuild /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildResource.Get"); + using var scope = _appBuildBuildServiceClientDiagnostics.CreateScope("AppBuildResource.Get"); scope.Start(); try { - var response = await _buildBuildServiceRestClient.GetBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _appBuildBuildServiceRestClient.GetBuildAsync(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 BuildResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppBuildResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -153,16 +153,16 @@ public virtual async Task> GetAsync(CancellationToken ca /// Operation Id: BuildService_GetBuild /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildResource.Get"); + using var scope = _appBuildBuildServiceClientDiagnostics.CreateScope("AppBuildResource.Get"); scope.Start(); try { - var response = _buildBuildServiceRestClient.GetBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var response = _appBuildBuildServiceRestClient.GetBuild(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 BuildResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppBuildResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -180,16 +180,16 @@ public virtual Response Get(CancellationToken cancellationToken = /// Parameters for the create or update operation. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, BuildData data, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, AppBuildData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildResource.Update"); + using var scope = _appBuildBuildServiceClientDiagnostics.CreateScope("AppBuildResource.Update"); scope.Start(); try { - var response = await _buildBuildServiceRestClient.CreateOrUpdateBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(Response.FromValue(new BuildResource(Client, response), response.GetRawResponse())); + var response = await _appBuildBuildServiceRestClient.CreateOrUpdateBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(Response.FromValue(new AppBuildResource(Client, response), response.GetRawResponse())); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -210,16 +210,16 @@ public virtual async Task> UpdateAsync(WaitUntil wai /// Parameters for the create or update operation. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, BuildData data, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, AppBuildData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _buildBuildServiceClientDiagnostics.CreateScope("BuildResource.Update"); + using var scope = _appBuildBuildServiceClientDiagnostics.CreateScope("AppBuildResource.Update"); scope.Start(); try { - var response = _buildBuildServiceRestClient.CreateOrUpdateBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new AppPlatformArmOperation(Response.FromValue(new BuildResource(Client, response), response.GetRawResponse())); + var response = _appBuildBuildServiceRestClient.CreateOrUpdateBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(Response.FromValue(new AppBuildResource(Client, response), response.GetRawResponse())); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildResultCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildResultCollection.cs similarity index 57% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildResultCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildResultCollection.cs index 76de017be6047..e267cfc8c64de 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildResultCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildResultCollection.cs @@ -20,28 +20,28 @@ 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 GetBuildResults method from an instance of . + /// 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 GetAppBuildResults method from an instance of . /// - public partial class BuildResultCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class AppBuildResultCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _buildResultBuildServiceClientDiagnostics; - private readonly BuildServiceRestOperations _buildResultBuildServiceRestClient; + private readonly ClientDiagnostics _appBuildResultBuildServiceClientDiagnostics; + private readonly BuildServiceRestOperations _appBuildResultBuildServiceRestClient; - /// Initializes a new instance of the class for mocking. - protected BuildResultCollection() + /// Initializes a new instance of the class for mocking. + protected AppBuildResultCollection() { } - /// Initializes a new instance of the class. + /// 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 BuildResultCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal AppBuildResultCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _buildResultBuildServiceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", BuildResultResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(BuildResultResource.ResourceType, out string buildResultBuildServiceApiVersion); - _buildResultBuildServiceRestClient = new BuildServiceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, buildResultBuildServiceApiVersion); + _appBuildResultBuildServiceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", AppBuildResultResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AppBuildResultResource.ResourceType, out string appBuildResultBuildServiceApiVersion); + _appBuildResultBuildServiceRestClient = new BuildServiceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appBuildResultBuildServiceApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -49,8 +49,8 @@ internal BuildResultCollection(ArmClient client, ResourceIdentifier id) : base(c internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != BuildResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, BuildResource.ResourceType), nameof(id)); + if (id.ResourceType != AppBuildResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AppBuildResource.ResourceType), nameof(id)); } /// @@ -62,18 +62,18 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string buildResultName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string buildResultName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(buildResultName, nameof(buildResultName)); - using var scope = _buildResultBuildServiceClientDiagnostics.CreateScope("BuildResultCollection.Get"); + using var scope = _appBuildResultBuildServiceClientDiagnostics.CreateScope("AppBuildResultCollection.Get"); scope.Start(); try { - var response = await _buildResultBuildServiceRestClient.GetBuildResultAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildResultName, cancellationToken).ConfigureAwait(false); + var response = await _appBuildResultBuildServiceRestClient.GetBuildResultAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildResultName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new BuildResultResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppBuildResultResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -91,18 +91,18 @@ public virtual async Task> GetAsync(string buildRe /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string buildResultName, CancellationToken cancellationToken = default) + public virtual Response Get(string buildResultName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(buildResultName, nameof(buildResultName)); - using var scope = _buildResultBuildServiceClientDiagnostics.CreateScope("BuildResultCollection.Get"); + using var scope = _appBuildResultBuildServiceClientDiagnostics.CreateScope("AppBuildResultCollection.Get"); scope.Start(); try { - var response = _buildResultBuildServiceRestClient.GetBuildResult(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildResultName, cancellationToken); + var response = _appBuildResultBuildServiceRestClient.GetBuildResult(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildResultName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new BuildResultResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppBuildResultResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -117,17 +117,17 @@ public virtual Response Get(string buildResultName, Cancell /// Operation Id: BuildService_ListBuildResults /// /// 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) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { - using var scope = _buildResultBuildServiceClientDiagnostics.CreateScope("BuildResultCollection.GetAll"); + using var scope = _appBuildResultBuildServiceClientDiagnostics.CreateScope("AppBuildResultCollection.GetAll"); scope.Start(); try { - var response = await _buildResultBuildServiceRestClient.ListBuildResultsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new BuildResultResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = await _appBuildResultBuildServiceRestClient.ListBuildResultsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new AppBuildResultResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -135,14 +135,14 @@ async Task> FirstPageFunc(int? pageSizeHint) throw; } } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) + async Task> NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _buildResultBuildServiceClientDiagnostics.CreateScope("BuildResultCollection.GetAll"); + using var scope = _appBuildResultBuildServiceClientDiagnostics.CreateScope("AppBuildResultCollection.GetAll"); scope.Start(); try { - var response = await _buildResultBuildServiceRestClient.ListBuildResultsNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new BuildResultResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = await _appBuildResultBuildServiceRestClient.ListBuildResultsNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new AppBuildResultResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -159,17 +159,17 @@ async Task> NextPageFunc(string nextLink, int? pageSiz /// Operation Id: BuildService_ListBuildResults /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { - using var scope = _buildResultBuildServiceClientDiagnostics.CreateScope("BuildResultCollection.GetAll"); + using var scope = _appBuildResultBuildServiceClientDiagnostics.CreateScope("AppBuildResultCollection.GetAll"); scope.Start(); try { - var response = _buildResultBuildServiceRestClient.ListBuildResults(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new BuildResultResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = _appBuildResultBuildServiceRestClient.ListBuildResults(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AppBuildResultResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -177,14 +177,14 @@ Page FirstPageFunc(int? pageSizeHint) throw; } } - Page NextPageFunc(string nextLink, int? pageSizeHint) + Page NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _buildResultBuildServiceClientDiagnostics.CreateScope("BuildResultCollection.GetAll"); + using var scope = _appBuildResultBuildServiceClientDiagnostics.CreateScope("AppBuildResultCollection.GetAll"); scope.Start(); try { - var response = _buildResultBuildServiceRestClient.ListBuildResultsNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new BuildResultResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = _appBuildResultBuildServiceRestClient.ListBuildResultsNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AppBuildResultResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -208,11 +208,11 @@ public virtual async Task> ExistsAsync(string buildResultName, Ca { Argument.AssertNotNullOrEmpty(buildResultName, nameof(buildResultName)); - using var scope = _buildResultBuildServiceClientDiagnostics.CreateScope("BuildResultCollection.Exists"); + using var scope = _appBuildResultBuildServiceClientDiagnostics.CreateScope("AppBuildResultCollection.Exists"); scope.Start(); try { - var response = await _buildResultBuildServiceRestClient.GetBuildResultAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildResultName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _appBuildResultBuildServiceRestClient.GetBuildResultAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildResultName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -235,11 +235,11 @@ public virtual Response Exists(string buildResultName, CancellationToken c { Argument.AssertNotNullOrEmpty(buildResultName, nameof(buildResultName)); - using var scope = _buildResultBuildServiceClientDiagnostics.CreateScope("BuildResultCollection.Exists"); + using var scope = _appBuildResultBuildServiceClientDiagnostics.CreateScope("AppBuildResultCollection.Exists"); scope.Start(); try { - var response = _buildResultBuildServiceRestClient.GetBuildResult(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildResultName, cancellationToken: cancellationToken); + var response = _appBuildResultBuildServiceRestClient.GetBuildResult(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, buildResultName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -249,7 +249,7 @@ public virtual Response Exists(string buildResultName, CancellationToken c } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -259,7 +259,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildResultData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildResultData.cs similarity index 60% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildResultData.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildResultData.cs index 61414053e0f37..3c0f867aea7cb 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildResultData.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildResultData.cs @@ -11,21 +11,21 @@ namespace Azure.ResourceManager.AppPlatform { - /// A class representing the BuildResult data model. - public partial class BuildResultData : ResourceData + /// A class representing the AppBuildResult data model. + public partial class AppBuildResultData : ResourceData { - /// Initializes a new instance of BuildResultData. - public BuildResultData() + /// Initializes a new instance of AppBuildResultData. + public AppBuildResultData() { } - /// Initializes a new instance of BuildResultData. + /// Initializes a new instance of AppBuildResultData. /// The id. /// The name. /// The resourceType. /// The systemData. /// Properties of the build result resource. - internal BuildResultData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, BuildResultProperties properties) : base(id, name, resourceType, systemData) + internal AppBuildResultData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, BuildResultProperties properties) : base(id, name, resourceType, systemData) { Properties = properties; } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildResultResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildResultResource.cs similarity index 67% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildResultResource.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildResultResource.cs index 7fb679ebc7216..5c9bf15c093ed 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildResultResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildResultResource.cs @@ -18,46 +18,46 @@ namespace Azure.ResourceManager.AppPlatform { /// - /// A Class representing a BuildResult 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 GetBuildResultResource method. - /// Otherwise you can get one from its parent resource using the GetBuildResult method. + /// A Class representing an AppBuildResult 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 GetAppBuildResultResource method. + /// Otherwise you can get one from its parent resource using the GetAppBuildResult method. /// - public partial class BuildResultResource : ArmResource + public partial class AppBuildResultResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, string buildResultName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}/results/{buildResultName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _buildResultBuildServiceClientDiagnostics; - private readonly BuildServiceRestOperations _buildResultBuildServiceRestClient; - private readonly BuildResultData _data; + private readonly ClientDiagnostics _appBuildResultBuildServiceClientDiagnostics; + private readonly BuildServiceRestOperations _appBuildResultBuildServiceRestClient; + private readonly AppBuildResultData _data; - /// Initializes a new instance of the class for mocking. - protected BuildResultResource() + /// Initializes a new instance of the class for mocking. + protected AppBuildResultResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal BuildResultResource(ArmClient client, BuildResultData data) : this(client, data.Id) + internal AppBuildResultResource(ArmClient client, AppBuildResultData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// 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 BuildResultResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal AppBuildResultResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _buildResultBuildServiceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string buildResultBuildServiceApiVersion); - _buildResultBuildServiceRestClient = new BuildServiceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, buildResultBuildServiceApiVersion); + _appBuildResultBuildServiceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string appBuildResultBuildServiceApiVersion); + _appBuildResultBuildServiceRestClient = new BuildServiceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appBuildResultBuildServiceApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -71,7 +71,7 @@ internal BuildResultResource(ArmClient client, ResourceIdentifier id) : base(cli /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual BuildResultData Data + public virtual AppBuildResultData Data { get { @@ -93,16 +93,16 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// Operation Id: BuildService_GetBuildResult /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _buildResultBuildServiceClientDiagnostics.CreateScope("BuildResultResource.Get"); + using var scope = _appBuildResultBuildServiceClientDiagnostics.CreateScope("AppBuildResultResource.Get"); scope.Start(); try { - var response = await _buildResultBuildServiceRestClient.GetBuildResultAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _appBuildResultBuildServiceRestClient.GetBuildResultAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, 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 BuildResultResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppBuildResultResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -117,16 +117,16 @@ public virtual async Task> GetAsync(CancellationTo /// Operation Id: BuildService_GetBuildResult /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _buildResultBuildServiceClientDiagnostics.CreateScope("BuildResultResource.Get"); + using var scope = _appBuildResultBuildServiceClientDiagnostics.CreateScope("AppBuildResultResource.Get"); scope.Start(); try { - var response = _buildResultBuildServiceRestClient.GetBuildResult(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var response = _appBuildResultBuildServiceRestClient.GetBuildResult(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new BuildResultResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppBuildResultResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -143,11 +143,11 @@ public virtual Response Get(CancellationToken cancellationT /// The cancellation token to use. public virtual async Task> GetBuildResultLogAsync(CancellationToken cancellationToken = default) { - using var scope = _buildResultBuildServiceClientDiagnostics.CreateScope("BuildResultResource.GetBuildResultLog"); + using var scope = _appBuildResultBuildServiceClientDiagnostics.CreateScope("AppBuildResultResource.GetBuildResultLog"); scope.Start(); try { - var response = await _buildResultBuildServiceRestClient.GetBuildResultLogAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _appBuildResultBuildServiceRestClient.GetBuildResultLogAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -165,11 +165,11 @@ public virtual async Task> GetBuildResultLogAsync(Cance /// The cancellation token to use. public virtual Response GetBuildResultLog(CancellationToken cancellationToken = default) { - using var scope = _buildResultBuildServiceClientDiagnostics.CreateScope("BuildResultResource.GetBuildResultLog"); + using var scope = _appBuildResultBuildServiceClientDiagnostics.CreateScope("AppBuildResultResource.GetBuildResultLog"); scope.Start(); try { - var response = _buildResultBuildServiceRestClient.GetBuildResultLog(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var response = _appBuildResultBuildServiceRestClient.GetBuildResultLog(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); return response; } catch (Exception e) diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceAgentPoolResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceAgentPoolResource.cs similarity index 59% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceAgentPoolResource.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceAgentPoolResource.cs index caf5db974fb4d..e5f582fc53beb 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceAgentPoolResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceAgentPoolResource.cs @@ -17,46 +17,46 @@ namespace Azure.ResourceManager.AppPlatform { /// - /// A Class representing a BuildServiceAgentPoolResource 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 GetBuildServiceAgentPoolResource method. - /// Otherwise you can get one from its parent resource using the GetBuildServiceAgentPoolResource method. + /// A Class representing an AppBuildServiceAgentPoolResource 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 GetAppBuildServiceAgentPoolResource method. + /// Otherwise you can get one from its parent resource using the GetAppBuildServiceAgentPoolResource method. /// - public partial class BuildServiceAgentPoolResource : ArmResource + public partial class AppBuildServiceAgentPoolResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string agentPoolName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/agentPools/{agentPoolName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics; - private readonly BuildServiceAgentPoolRestOperations _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient; - private readonly BuildServiceAgentPoolResourceData _data; + private readonly ClientDiagnostics _appBuildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics; + private readonly BuildServiceAgentPoolRestOperations _appBuildServiceAgentPoolResourceBuildServiceAgentPoolRestClient; + private readonly AppBuildServiceAgentPoolResourceData _data; - /// Initializes a new instance of the class for mocking. - protected BuildServiceAgentPoolResource() + /// Initializes a new instance of the class for mocking. + protected AppBuildServiceAgentPoolResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal BuildServiceAgentPoolResource(ArmClient client, BuildServiceAgentPoolResourceData data) : this(client, data.Id) + internal AppBuildServiceAgentPoolResource(ArmClient client, AppBuildServiceAgentPoolResourceData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// 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 BuildServiceAgentPoolResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal AppBuildServiceAgentPoolResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string buildServiceAgentPoolResourceBuildServiceAgentPoolApiVersion); - _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient = new BuildServiceAgentPoolRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, buildServiceAgentPoolResourceBuildServiceAgentPoolApiVersion); + _appBuildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string appBuildServiceAgentPoolResourceBuildServiceAgentPoolApiVersion); + _appBuildServiceAgentPoolResourceBuildServiceAgentPoolRestClient = new BuildServiceAgentPoolRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appBuildServiceAgentPoolResourceBuildServiceAgentPoolApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -70,7 +70,7 @@ internal BuildServiceAgentPoolResource(ArmClient client, ResourceIdentifier id) /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual BuildServiceAgentPoolResourceData Data + public virtual AppBuildServiceAgentPoolResourceData Data { get { @@ -92,16 +92,16 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// Operation Id: BuildServiceAgentPool_Get /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResource.Get"); + using var scope = _appBuildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("AppBuildServiceAgentPoolResource.Get"); scope.Start(); try { - var response = await _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _appBuildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.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 BuildServiceAgentPoolResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppBuildServiceAgentPoolResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -116,16 +116,16 @@ public virtual async Task> GetAsync(Canc /// Operation Id: BuildServiceAgentPool_Get /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResource.Get"); + using var scope = _appBuildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("AppBuildServiceAgentPoolResource.Get"); scope.Start(); try { - var response = _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var response = _appBuildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.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 BuildServiceAgentPoolResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppBuildServiceAgentPoolResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -143,16 +143,16 @@ public virtual Response Get(CancellationToken can /// Parameters for the update operation. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, BuildServiceAgentPoolResourceData data, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, AppBuildServiceAgentPoolResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResource.Update"); + using var scope = _appBuildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("AppBuildServiceAgentPoolResource.Update"); scope.Start(); try { - var response = await _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.UpdatePutAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(new BuildServiceAgentPoolResourceOperationSource(Client), _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics, Pipeline, _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.CreateUpdatePutRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appBuildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.UpdatePutAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new AppBuildServiceAgentPoolResourceOperationSource(Client), _appBuildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics, Pipeline, _appBuildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.CreateUpdatePutRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -173,16 +173,16 @@ public virtual async Task> UpdateAsy /// Parameters for the update operation. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, BuildServiceAgentPoolResourceData data, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, AppBuildServiceAgentPoolResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResource.Update"); + using var scope = _appBuildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("AppBuildServiceAgentPoolResource.Update"); scope.Start(); try { - var response = _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.UpdatePut(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new AppPlatformArmOperation(new BuildServiceAgentPoolResourceOperationSource(Client), _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics, Pipeline, _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.CreateUpdatePutRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appBuildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.UpdatePut(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new AppBuildServiceAgentPoolResourceOperationSource(Client), _appBuildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics, Pipeline, _appBuildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.CreateUpdatePutRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceAgentPoolResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceAgentPoolResourceCollection.cs similarity index 56% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceAgentPoolResourceCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceAgentPoolResourceCollection.cs index 66b97881be5a0..2b087367ad813 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceAgentPoolResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceAgentPoolResourceCollection.cs @@ -20,28 +20,28 @@ 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 GetBuildServiceAgentPoolResources method from an instance of . + /// 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 GetAppBuildServiceAgentPoolResources method from an instance of . /// - public partial class BuildServiceAgentPoolResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class AppBuildServiceAgentPoolResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics; - private readonly BuildServiceAgentPoolRestOperations _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient; + private readonly ClientDiagnostics _appBuildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics; + private readonly BuildServiceAgentPoolRestOperations _appBuildServiceAgentPoolResourceBuildServiceAgentPoolRestClient; - /// Initializes a new instance of the class for mocking. - protected BuildServiceAgentPoolResourceCollection() + /// Initializes a new instance of the class for mocking. + protected AppBuildServiceAgentPoolResourceCollection() { } - /// Initializes a new instance of the class. + /// 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 BuildServiceAgentPoolResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal AppBuildServiceAgentPoolResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", BuildServiceAgentPoolResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(BuildServiceAgentPoolResource.ResourceType, out string buildServiceAgentPoolResourceBuildServiceAgentPoolApiVersion); - _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient = new BuildServiceAgentPoolRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, buildServiceAgentPoolResourceBuildServiceAgentPoolApiVersion); + _appBuildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", AppBuildServiceAgentPoolResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AppBuildServiceAgentPoolResource.ResourceType, out string appBuildServiceAgentPoolResourceBuildServiceAgentPoolApiVersion); + _appBuildServiceAgentPoolResourceBuildServiceAgentPoolRestClient = new BuildServiceAgentPoolRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appBuildServiceAgentPoolResourceBuildServiceAgentPoolApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -49,8 +49,8 @@ internal BuildServiceAgentPoolResourceCollection(ArmClient client, ResourceIdent internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != BuildServiceResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, BuildServiceResource.ResourceType), nameof(id)); + if (id.ResourceType != AppBuildServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AppBuildServiceResource.ResourceType), nameof(id)); } /// @@ -64,17 +64,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// 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 agentPoolName, BuildServiceAgentPoolResourceData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string agentPoolName, AppBuildServiceAgentPoolResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResourceCollection.CreateOrUpdate"); + using var scope = _appBuildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("AppBuildServiceAgentPoolResourceCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.UpdatePutAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, agentPoolName, data, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(new BuildServiceAgentPoolResourceOperationSource(Client), _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics, Pipeline, _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.CreateUpdatePutRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, agentPoolName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appBuildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.UpdatePutAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, agentPoolName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new AppBuildServiceAgentPoolResourceOperationSource(Client), _appBuildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics, Pipeline, _appBuildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.CreateUpdatePutRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, agentPoolName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -97,17 +97,17 @@ public virtual async Task> CreateOrU /// 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 agentPoolName, BuildServiceAgentPoolResourceData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string agentPoolName, AppBuildServiceAgentPoolResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResourceCollection.CreateOrUpdate"); + using var scope = _appBuildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("AppBuildServiceAgentPoolResourceCollection.CreateOrUpdate"); scope.Start(); try { - var response = _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.UpdatePut(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, agentPoolName, data, cancellationToken); - var operation = new AppPlatformArmOperation(new BuildServiceAgentPoolResourceOperationSource(Client), _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics, Pipeline, _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.CreateUpdatePutRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, agentPoolName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appBuildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.UpdatePut(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, agentPoolName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new AppBuildServiceAgentPoolResourceOperationSource(Client), _appBuildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics, Pipeline, _appBuildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.CreateUpdatePutRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, agentPoolName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -128,18 +128,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string agentPoolName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string agentPoolName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); - using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResourceCollection.Get"); + using var scope = _appBuildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("AppBuildServiceAgentPoolResourceCollection.Get"); scope.Start(); try { - var response = await _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, agentPoolName, cancellationToken).ConfigureAwait(false); + var response = await _appBuildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, agentPoolName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new BuildServiceAgentPoolResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppBuildServiceAgentPoolResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -157,18 +157,18 @@ public virtual async Task> GetAsync(stri /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string agentPoolName, CancellationToken cancellationToken = default) + public virtual Response Get(string agentPoolName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); - using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResourceCollection.Get"); + using var scope = _appBuildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("AppBuildServiceAgentPoolResourceCollection.Get"); scope.Start(); try { - var response = _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, agentPoolName, cancellationToken); + var response = _appBuildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, agentPoolName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new BuildServiceAgentPoolResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppBuildServiceAgentPoolResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -183,17 +183,17 @@ public virtual Response Get(string agentPoolName, /// Operation Id: BuildServiceAgentPool_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) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { - using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResourceCollection.GetAll"); + using var scope = _appBuildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("AppBuildServiceAgentPoolResourceCollection.GetAll"); scope.Start(); try { - var response = await _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new BuildServiceAgentPoolResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = await _appBuildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new AppBuildServiceAgentPoolResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -201,14 +201,14 @@ async Task> FirstPageFunc(int? pageSizeHint) throw; } } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) + async Task> NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResourceCollection.GetAll"); + using var scope = _appBuildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("AppBuildServiceAgentPoolResourceCollection.GetAll"); scope.Start(); try { - var response = await _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new BuildServiceAgentPoolResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = await _appBuildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new AppBuildServiceAgentPoolResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -225,17 +225,17 @@ async Task> NextPageFunc(string nextLink, in /// Operation Id: BuildServiceAgentPool_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) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { - using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResourceCollection.GetAll"); + using var scope = _appBuildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("AppBuildServiceAgentPoolResourceCollection.GetAll"); scope.Start(); try { - var response = _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new BuildServiceAgentPoolResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = _appBuildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AppBuildServiceAgentPoolResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -243,14 +243,14 @@ Page FirstPageFunc(int? pageSizeHint) throw; } } - Page NextPageFunc(string nextLink, int? pageSizeHint) + Page NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResourceCollection.GetAll"); + using var scope = _appBuildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("AppBuildServiceAgentPoolResourceCollection.GetAll"); scope.Start(); try { - var response = _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new BuildServiceAgentPoolResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = _appBuildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AppBuildServiceAgentPoolResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -274,11 +274,11 @@ public virtual async Task> ExistsAsync(string agentPoolName, Canc { Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); - using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResourceCollection.Exists"); + using var scope = _appBuildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("AppBuildServiceAgentPoolResourceCollection.Exists"); scope.Start(); try { - var response = await _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, agentPoolName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _appBuildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, agentPoolName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -301,11 +301,11 @@ public virtual Response Exists(string agentPoolName, CancellationToken can { Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); - using var scope = _buildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("BuildServiceAgentPoolResourceCollection.Exists"); + using var scope = _appBuildServiceAgentPoolResourceBuildServiceAgentPoolClientDiagnostics.CreateScope("AppBuildServiceAgentPoolResourceCollection.Exists"); scope.Start(); try { - var response = _buildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, agentPoolName, cancellationToken: cancellationToken); + var response = _appBuildServiceAgentPoolResourceBuildServiceAgentPoolRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, agentPoolName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -315,7 +315,7 @@ public virtual Response Exists(string agentPoolName, CancellationToken can } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -325,7 +325,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceAgentPoolResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceAgentPoolResourceData.cs similarity index 55% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceAgentPoolResourceData.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceAgentPoolResourceData.cs index 8310d87789562..74fc109690e47 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceAgentPoolResourceData.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceAgentPoolResourceData.cs @@ -11,21 +11,21 @@ namespace Azure.ResourceManager.AppPlatform { - /// A class representing the BuildServiceAgentPoolResource data model. - public partial class BuildServiceAgentPoolResourceData : ResourceData + /// A class representing the AppBuildServiceAgentPoolResource data model. + public partial class AppBuildServiceAgentPoolResourceData : ResourceData { - /// Initializes a new instance of BuildServiceAgentPoolResourceData. - public BuildServiceAgentPoolResourceData() + /// Initializes a new instance of AppBuildServiceAgentPoolResourceData. + public AppBuildServiceAgentPoolResourceData() { } - /// Initializes a new instance of BuildServiceAgentPoolResourceData. + /// Initializes a new instance of AppBuildServiceAgentPoolResourceData. /// The id. /// The name. /// The resourceType. /// The systemData. /// build service agent pool properties. - internal BuildServiceAgentPoolResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, BuildServiceAgentPoolProperties properties) : base(id, name, resourceType, systemData) + internal AppBuildServiceAgentPoolResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, BuildServiceAgentPoolProperties properties) : base(id, name, resourceType, systemData) { Properties = properties; } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceCollection.cs similarity index 58% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceCollection.cs index 3058389dd147a..1ccc089e01d79 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceCollection.cs @@ -20,28 +20,28 @@ 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 GetBuildServices method from an instance of . + /// 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 GetAppBuildServices method from an instance of . /// - public partial class BuildServiceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class AppBuildServiceCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _buildServiceClientDiagnostics; - private readonly BuildServiceRestOperations _buildServiceRestClient; + private readonly ClientDiagnostics _appBuildServiceBuildServiceClientDiagnostics; + private readonly BuildServiceRestOperations _appBuildServiceBuildServiceRestClient; - /// Initializes a new instance of the class for mocking. - protected BuildServiceCollection() + /// Initializes a new instance of the class for mocking. + protected AppBuildServiceCollection() { } - /// Initializes a new instance of the class. + /// 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 BuildServiceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal AppBuildServiceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _buildServiceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", BuildServiceResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(BuildServiceResource.ResourceType, out string buildServiceApiVersion); - _buildServiceRestClient = new BuildServiceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, buildServiceApiVersion); + _appBuildServiceBuildServiceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", AppBuildServiceResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AppBuildServiceResource.ResourceType, out string appBuildServiceBuildServiceApiVersion); + _appBuildServiceBuildServiceRestClient = new BuildServiceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appBuildServiceBuildServiceApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -62,18 +62,18 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string buildServiceName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string buildServiceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); - using var scope = _buildServiceClientDiagnostics.CreateScope("BuildServiceCollection.Get"); + using var scope = _appBuildServiceBuildServiceClientDiagnostics.CreateScope("AppBuildServiceCollection.Get"); scope.Start(); try { - var response = await _buildServiceRestClient.GetBuildServiceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildServiceName, cancellationToken).ConfigureAwait(false); + var response = await _appBuildServiceBuildServiceRestClient.GetBuildServiceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildServiceName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new BuildServiceResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppBuildServiceResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -91,18 +91,18 @@ public virtual async Task> GetAsync(string buildS /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string buildServiceName, CancellationToken cancellationToken = default) + public virtual Response Get(string buildServiceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); - using var scope = _buildServiceClientDiagnostics.CreateScope("BuildServiceCollection.Get"); + using var scope = _appBuildServiceBuildServiceClientDiagnostics.CreateScope("AppBuildServiceCollection.Get"); scope.Start(); try { - var response = _buildServiceRestClient.GetBuildService(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildServiceName, cancellationToken); + var response = _appBuildServiceBuildServiceRestClient.GetBuildService(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildServiceName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new BuildServiceResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppBuildServiceResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -117,17 +117,17 @@ public virtual Response Get(string buildServiceName, Cance /// Operation Id: BuildService_ListBuildServices /// /// 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) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { - using var scope = _buildServiceClientDiagnostics.CreateScope("BuildServiceCollection.GetAll"); + using var scope = _appBuildServiceBuildServiceClientDiagnostics.CreateScope("AppBuildServiceCollection.GetAll"); scope.Start(); try { - var response = await _buildServiceRestClient.ListBuildServicesAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new BuildServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = await _appBuildServiceBuildServiceRestClient.ListBuildServicesAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new AppBuildServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -135,14 +135,14 @@ async Task> FirstPageFunc(int? pageSizeHint) throw; } } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) + async Task> NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _buildServiceClientDiagnostics.CreateScope("BuildServiceCollection.GetAll"); + using var scope = _appBuildServiceBuildServiceClientDiagnostics.CreateScope("AppBuildServiceCollection.GetAll"); scope.Start(); try { - var response = await _buildServiceRestClient.ListBuildServicesNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new BuildServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = await _appBuildServiceBuildServiceRestClient.ListBuildServicesNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new AppBuildServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -159,17 +159,17 @@ async Task> NextPageFunc(string nextLink, int? pageSi /// Operation Id: BuildService_ListBuildServices /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { - using var scope = _buildServiceClientDiagnostics.CreateScope("BuildServiceCollection.GetAll"); + using var scope = _appBuildServiceBuildServiceClientDiagnostics.CreateScope("AppBuildServiceCollection.GetAll"); scope.Start(); try { - var response = _buildServiceRestClient.ListBuildServices(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new BuildServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = _appBuildServiceBuildServiceRestClient.ListBuildServices(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AppBuildServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -177,14 +177,14 @@ Page FirstPageFunc(int? pageSizeHint) throw; } } - Page NextPageFunc(string nextLink, int? pageSizeHint) + Page NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _buildServiceClientDiagnostics.CreateScope("BuildServiceCollection.GetAll"); + using var scope = _appBuildServiceBuildServiceClientDiagnostics.CreateScope("AppBuildServiceCollection.GetAll"); scope.Start(); try { - var response = _buildServiceRestClient.ListBuildServicesNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new BuildServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = _appBuildServiceBuildServiceRestClient.ListBuildServicesNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AppBuildServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -208,11 +208,11 @@ public virtual async Task> ExistsAsync(string buildServiceName, C { Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); - using var scope = _buildServiceClientDiagnostics.CreateScope("BuildServiceCollection.Exists"); + using var scope = _appBuildServiceBuildServiceClientDiagnostics.CreateScope("AppBuildServiceCollection.Exists"); scope.Start(); try { - var response = await _buildServiceRestClient.GetBuildServiceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildServiceName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _appBuildServiceBuildServiceRestClient.GetBuildServiceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildServiceName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -235,11 +235,11 @@ public virtual Response Exists(string buildServiceName, CancellationToken { Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); - using var scope = _buildServiceClientDiagnostics.CreateScope("BuildServiceCollection.Exists"); + using var scope = _appBuildServiceBuildServiceClientDiagnostics.CreateScope("AppBuildServiceCollection.Exists"); scope.Start(); try { - var response = _buildServiceRestClient.GetBuildService(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildServiceName, cancellationToken: cancellationToken); + var response = _appBuildServiceBuildServiceRestClient.GetBuildService(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildServiceName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -249,7 +249,7 @@ public virtual Response Exists(string buildServiceName, CancellationToken } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -259,7 +259,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceData.cs similarity index 59% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceData.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceData.cs index de82a04601d6b..cf8411fa8e5c8 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceData.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceData.cs @@ -11,21 +11,21 @@ namespace Azure.ResourceManager.AppPlatform { - /// A class representing the BuildService data model. - public partial class BuildServiceData : ResourceData + /// A class representing the AppBuildService data model. + public partial class AppBuildServiceData : ResourceData { - /// Initializes a new instance of BuildServiceData. - public BuildServiceData() + /// Initializes a new instance of AppBuildServiceData. + public AppBuildServiceData() { } - /// Initializes a new instance of BuildServiceData. + /// Initializes a new instance of AppBuildServiceData. /// The id. /// The name. /// The resourceType. /// The systemData. /// Properties of the build resource. - internal BuildServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, BuildServiceProperties properties) : base(id, name, resourceType, systemData) + internal AppBuildServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, BuildServiceProperties properties) : base(id, name, resourceType, systemData) { Properties = properties; } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceResource.cs similarity index 72% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceResource.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceResource.cs index 2b42114062327..0bbbb5a8d32da 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildServiceResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceResource.cs @@ -18,46 +18,46 @@ namespace Azure.ResourceManager.AppPlatform { /// - /// A Class representing a BuildService 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 GetBuildServiceResource method. - /// Otherwise you can get one from its parent resource using the GetBuildService method. + /// A Class representing an AppBuildService 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 GetAppBuildServiceResource method. + /// Otherwise you can get one from its parent resource using the GetAppBuildService method. /// - public partial class BuildServiceResource : ArmResource + public partial class AppBuildServiceResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _buildServiceClientDiagnostics; - private readonly BuildServiceRestOperations _buildServiceRestClient; - private readonly BuildServiceData _data; + private readonly ClientDiagnostics _appBuildServiceBuildServiceClientDiagnostics; + private readonly BuildServiceRestOperations _appBuildServiceBuildServiceRestClient; + private readonly AppBuildServiceData _data; - /// Initializes a new instance of the class for mocking. - protected BuildServiceResource() + /// Initializes a new instance of the class for mocking. + protected AppBuildServiceResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal BuildServiceResource(ArmClient client, BuildServiceData data) : this(client, data.Id) + internal AppBuildServiceResource(ArmClient client, AppBuildServiceData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// 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 BuildServiceResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal AppBuildServiceResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _buildServiceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string buildServiceApiVersion); - _buildServiceRestClient = new BuildServiceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, buildServiceApiVersion); + _appBuildServiceBuildServiceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string appBuildServiceBuildServiceApiVersion); + _appBuildServiceBuildServiceRestClient = new BuildServiceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appBuildServiceBuildServiceApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -71,7 +71,7 @@ internal BuildServiceResource(ArmClient client, ResourceIdentifier id) : base(cl /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual BuildServiceData Data + public virtual AppBuildServiceData Data { get { @@ -87,11 +87,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets a collection of BuildResources in the BuildService. - /// An object representing collection of BuildResources and their operations over a BuildResource. - public virtual BuildCollection GetBuilds() + /// Gets a collection of AppBuildResources in the AppBuildService. + /// An object representing collection of AppBuildResources and their operations over a AppBuildResource. + public virtual AppBuildCollection GetAppBuilds() { - return GetCachedClient(Client => new BuildCollection(Client, Id)); + return GetCachedClient(Client => new AppBuildCollection(Client, Id)); } /// @@ -104,9 +104,9 @@ public virtual BuildCollection GetBuilds() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetBuildAsync(string buildName, CancellationToken cancellationToken = default) + public virtual async Task> GetAppBuildAsync(string buildName, CancellationToken cancellationToken = default) { - return await GetBuilds().GetAsync(buildName, cancellationToken).ConfigureAwait(false); + return await GetAppBuilds().GetAsync(buildName, cancellationToken).ConfigureAwait(false); } /// @@ -119,12 +119,12 @@ public virtual async Task> GetBuildAsync(string buildNam /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetBuild(string buildName, CancellationToken cancellationToken = default) + public virtual Response GetAppBuild(string buildName, CancellationToken cancellationToken = default) { - return GetBuilds().Get(buildName, cancellationToken); + return GetAppBuilds().Get(buildName, cancellationToken); } - /// Gets a collection of SupportedBuildpackResources in the BuildService. + /// Gets a collection of SupportedBuildpackResources in the AppBuildService. /// An object representing collection of SupportedBuildpackResources and their operations over a SupportedBuildpackResource. public virtual SupportedBuildpackResourceCollection GetSupportedBuildpackResources() { @@ -161,7 +161,7 @@ public virtual Response GetSupportedBuildpackResourc return GetSupportedBuildpackResources().Get(buildpackName, cancellationToken); } - /// Gets a collection of SupportedStackResources in the BuildService. + /// Gets a collection of SupportedStackResources in the AppBuildService. /// An object representing collection of SupportedStackResources and their operations over a SupportedStackResource. public virtual SupportedStackResourceCollection GetSupportedStackResources() { @@ -198,11 +198,11 @@ public virtual Response GetSupportedStackResource(string return GetSupportedStackResources().Get(stackName, cancellationToken); } - /// Gets a collection of BuilderResources in the BuildService. - /// An object representing collection of BuilderResources and their operations over a BuilderResource. - public virtual BuilderResourceCollection GetBuilderResources() + /// Gets a collection of AppBuilderResources in the AppBuildService. + /// An object representing collection of AppBuilderResources and their operations over a AppBuilderResource. + public virtual AppBuilderResourceCollection GetAppBuilderResources() { - return GetCachedClient(Client => new BuilderResourceCollection(Client, Id)); + return GetCachedClient(Client => new AppBuilderResourceCollection(Client, Id)); } /// @@ -215,9 +215,9 @@ public virtual BuilderResourceCollection GetBuilderResources() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetBuilderResourceAsync(string builderName, CancellationToken cancellationToken = default) + public virtual async Task> GetAppBuilderResourceAsync(string builderName, CancellationToken cancellationToken = default) { - return await GetBuilderResources().GetAsync(builderName, cancellationToken).ConfigureAwait(false); + return await GetAppBuilderResources().GetAsync(builderName, cancellationToken).ConfigureAwait(false); } /// @@ -230,16 +230,16 @@ public virtual async Task> GetBuilderResourceAsync(str /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetBuilderResource(string builderName, CancellationToken cancellationToken = default) + public virtual Response GetAppBuilderResource(string builderName, CancellationToken cancellationToken = default) { - return GetBuilderResources().Get(builderName, cancellationToken); + return GetAppBuilderResources().Get(builderName, cancellationToken); } - /// Gets a collection of BuildServiceAgentPoolResources in the BuildService. - /// An object representing collection of BuildServiceAgentPoolResources and their operations over a BuildServiceAgentPoolResource. - public virtual BuildServiceAgentPoolResourceCollection GetBuildServiceAgentPoolResources() + /// Gets a collection of AppBuildServiceAgentPoolResources in the AppBuildService. + /// An object representing collection of AppBuildServiceAgentPoolResources and their operations over a AppBuildServiceAgentPoolResource. + public virtual AppBuildServiceAgentPoolResourceCollection GetAppBuildServiceAgentPoolResources() { - return GetCachedClient(Client => new BuildServiceAgentPoolResourceCollection(Client, Id)); + return GetCachedClient(Client => new AppBuildServiceAgentPoolResourceCollection(Client, Id)); } /// @@ -252,9 +252,9 @@ public virtual BuildServiceAgentPoolResourceCollection GetBuildServiceAgentPoolR /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetBuildServiceAgentPoolResourceAsync(string agentPoolName, CancellationToken cancellationToken = default) + public virtual async Task> GetAppBuildServiceAgentPoolResourceAsync(string agentPoolName, CancellationToken cancellationToken = default) { - return await GetBuildServiceAgentPoolResources().GetAsync(agentPoolName, cancellationToken).ConfigureAwait(false); + return await GetAppBuildServiceAgentPoolResources().GetAsync(agentPoolName, cancellationToken).ConfigureAwait(false); } /// @@ -267,9 +267,9 @@ public virtual async Task> GetBuildServi /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetBuildServiceAgentPoolResource(string agentPoolName, CancellationToken cancellationToken = default) + public virtual Response GetAppBuildServiceAgentPoolResource(string agentPoolName, CancellationToken cancellationToken = default) { - return GetBuildServiceAgentPoolResources().Get(agentPoolName, cancellationToken); + return GetAppBuildServiceAgentPoolResources().Get(agentPoolName, cancellationToken); } /// @@ -278,16 +278,16 @@ public virtual Response GetBuildServiceAgentPoolR /// Operation Id: BuildService_GetBuildService /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _buildServiceClientDiagnostics.CreateScope("BuildServiceResource.Get"); + using var scope = _appBuildServiceBuildServiceClientDiagnostics.CreateScope("AppBuildServiceResource.Get"); scope.Start(); try { - var response = await _buildServiceRestClient.GetBuildServiceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _appBuildServiceBuildServiceRestClient.GetBuildServiceAsync(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 BuildServiceResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppBuildServiceResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -302,16 +302,16 @@ public virtual async Task> GetAsync(CancellationT /// Operation Id: BuildService_GetBuildService /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _buildServiceClientDiagnostics.CreateScope("BuildServiceResource.Get"); + using var scope = _appBuildServiceBuildServiceClientDiagnostics.CreateScope("AppBuildServiceResource.Get"); scope.Start(); try { - var response = _buildServiceRestClient.GetBuildService(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _appBuildServiceBuildServiceRestClient.GetBuildService(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new BuildServiceResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppBuildServiceResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -328,11 +328,11 @@ public virtual Response Get(CancellationToken cancellation /// The cancellation token to use. public virtual async Task> GetResourceUploadUrlAsync(CancellationToken cancellationToken = default) { - using var scope = _buildServiceClientDiagnostics.CreateScope("BuildServiceResource.GetResourceUploadUrl"); + using var scope = _appBuildServiceBuildServiceClientDiagnostics.CreateScope("AppBuildServiceResource.GetResourceUploadUrl"); scope.Start(); try { - var response = await _buildServiceRestClient.GetResourceUploadUrlAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _appBuildServiceBuildServiceRestClient.GetResourceUploadUrlAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -350,11 +350,11 @@ public virtual async Task> GetResourceUploadU /// The cancellation token to use. public virtual Response GetResourceUploadUrl(CancellationToken cancellationToken = default) { - using var scope = _buildServiceClientDiagnostics.CreateScope("BuildServiceResource.GetResourceUploadUrl"); + using var scope = _appBuildServiceBuildServiceClientDiagnostics.CreateScope("AppBuildServiceResource.GetResourceUploadUrl"); scope.Start(); try { - var response = _buildServiceRestClient.GetResourceUploadUrl(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _appBuildServiceBuildServiceRestClient.GetResourceUploadUrl(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); return response; } catch (Exception e) diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuilderResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuilderResource.cs similarity index 69% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuilderResource.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuilderResource.cs index 04a26b122f5b2..16cfe95dce49b 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuilderResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuilderResource.cs @@ -17,46 +17,46 @@ namespace Azure.ResourceManager.AppPlatform { /// - /// A Class representing a BuilderResource 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 GetBuilderResource method. - /// Otherwise you can get one from its parent resource using the GetBuilderResource method. + /// A Class representing an AppBuilderResource 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 GetAppBuilderResource method. + /// Otherwise you can get one from its parent resource using the GetAppBuilderResource method. /// - public partial class BuilderResource : ArmResource + public partial class AppBuilderResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string builderName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _builderResourceBuildServiceBuilderClientDiagnostics; - private readonly BuildServiceBuilderRestOperations _builderResourceBuildServiceBuilderRestClient; - private readonly BuilderResourceData _data; + private readonly ClientDiagnostics _appBuilderResourceBuildServiceBuilderClientDiagnostics; + private readonly BuildServiceBuilderRestOperations _appBuilderResourceBuildServiceBuilderRestClient; + private readonly AppBuilderResourceData _data; - /// Initializes a new instance of the class for mocking. - protected BuilderResource() + /// Initializes a new instance of the class for mocking. + protected AppBuilderResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal BuilderResource(ArmClient client, BuilderResourceData data) : this(client, data.Id) + internal AppBuilderResource(ArmClient client, AppBuilderResourceData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// 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 BuilderResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal AppBuilderResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _builderResourceBuildServiceBuilderClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string builderResourceBuildServiceBuilderApiVersion); - _builderResourceBuildServiceBuilderRestClient = new BuildServiceBuilderRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, builderResourceBuildServiceBuilderApiVersion); + _appBuilderResourceBuildServiceBuilderClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string appBuilderResourceBuildServiceBuilderApiVersion); + _appBuilderResourceBuildServiceBuilderRestClient = new BuildServiceBuilderRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appBuilderResourceBuildServiceBuilderApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -70,7 +70,7 @@ internal BuilderResource(ArmClient client, ResourceIdentifier id) : base(client, /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual BuilderResourceData Data + public virtual AppBuilderResourceData Data { get { @@ -86,7 +86,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets a collection of BuildpackBindingResources in the BuilderResource. + /// Gets a collection of BuildpackBindingResources in the AppBuilderResource. /// An object representing collection of BuildpackBindingResources and their operations over a BuildpackBindingResource. public virtual BuildpackBindingResourceCollection GetBuildpackBindingResources() { @@ -129,16 +129,16 @@ public virtual Response GetBuildpackBindingResource(st /// Operation Id: BuildServiceBuilder_Get /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResource.Get"); + using var scope = _appBuilderResourceBuildServiceBuilderClientDiagnostics.CreateScope("AppBuilderResource.Get"); scope.Start(); try { - var response = await _builderResourceBuildServiceBuilderRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _appBuilderResourceBuildServiceBuilderRestClient.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 BuilderResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppBuilderResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -153,16 +153,16 @@ public virtual async Task> GetAsync(CancellationToken /// Operation Id: BuildServiceBuilder_Get /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResource.Get"); + using var scope = _appBuilderResourceBuildServiceBuilderClientDiagnostics.CreateScope("AppBuilderResource.Get"); scope.Start(); try { - var response = _builderResourceBuildServiceBuilderRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var response = _appBuilderResourceBuildServiceBuilderRestClient.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 BuilderResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppBuilderResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -180,12 +180,12 @@ public virtual Response Get(CancellationToken cancellationToken /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResource.Delete"); + using var scope = _appBuilderResourceBuildServiceBuilderClientDiagnostics.CreateScope("AppBuilderResource.Delete"); scope.Start(); try { - var response = await _builderResourceBuildServiceBuilderRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(_builderResourceBuildServiceBuilderClientDiagnostics, Pipeline, _builderResourceBuildServiceBuilderRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appBuilderResourceBuildServiceBuilderRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_appBuilderResourceBuildServiceBuilderClientDiagnostics, Pipeline, _appBuilderResourceBuildServiceBuilderRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -206,12 +206,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResource.Delete"); + using var scope = _appBuilderResourceBuildServiceBuilderClientDiagnostics.CreateScope("AppBuilderResource.Delete"); scope.Start(); try { - var response = _builderResourceBuildServiceBuilderRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new AppPlatformArmOperation(_builderResourceBuildServiceBuilderClientDiagnostics, Pipeline, _builderResourceBuildServiceBuilderRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appBuilderResourceBuildServiceBuilderRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_appBuilderResourceBuildServiceBuilderClientDiagnostics, Pipeline, _appBuilderResourceBuildServiceBuilderRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -232,16 +232,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// The target builder for the create or update operation. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, BuilderResourceData data, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, AppBuilderResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResource.Update"); + using var scope = _appBuilderResourceBuildServiceBuilderClientDiagnostics.CreateScope("AppBuilderResource.Update"); scope.Start(); try { - var response = await _builderResourceBuildServiceBuilderRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(new BuilderResourceOperationSource(Client), _builderResourceBuildServiceBuilderClientDiagnostics, Pipeline, _builderResourceBuildServiceBuilderRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appBuilderResourceBuildServiceBuilderRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new AppBuilderResourceOperationSource(Client), _appBuilderResourceBuildServiceBuilderClientDiagnostics, Pipeline, _appBuilderResourceBuildServiceBuilderRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -262,16 +262,16 @@ public virtual async Task> UpdateAsync(WaitUntil w /// The target builder for the create or update operation. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, BuilderResourceData data, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, AppBuilderResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResource.Update"); + using var scope = _appBuilderResourceBuildServiceBuilderClientDiagnostics.CreateScope("AppBuilderResource.Update"); scope.Start(); try { - var response = _builderResourceBuildServiceBuilderRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new AppPlatformArmOperation(new BuilderResourceOperationSource(Client), _builderResourceBuildServiceBuilderClientDiagnostics, Pipeline, _builderResourceBuildServiceBuilderRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appBuilderResourceBuildServiceBuilderRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new AppBuilderResourceOperationSource(Client), _appBuilderResourceBuildServiceBuilderClientDiagnostics, Pipeline, _appBuilderResourceBuildServiceBuilderRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuilderResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuilderResourceCollection.cs similarity index 59% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuilderResourceCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuilderResourceCollection.cs index 3aa3c5091a8f6..1fef699e4c082 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuilderResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuilderResourceCollection.cs @@ -20,28 +20,28 @@ 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 GetBuilderResources method from an instance of . + /// 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 GetAppBuilderResources method from an instance of . /// - public partial class BuilderResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class AppBuilderResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _builderResourceBuildServiceBuilderClientDiagnostics; - private readonly BuildServiceBuilderRestOperations _builderResourceBuildServiceBuilderRestClient; + private readonly ClientDiagnostics _appBuilderResourceBuildServiceBuilderClientDiagnostics; + private readonly BuildServiceBuilderRestOperations _appBuilderResourceBuildServiceBuilderRestClient; - /// Initializes a new instance of the class for mocking. - protected BuilderResourceCollection() + /// Initializes a new instance of the class for mocking. + protected AppBuilderResourceCollection() { } - /// Initializes a new instance of the class. + /// 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 BuilderResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal AppBuilderResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _builderResourceBuildServiceBuilderClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", BuilderResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(BuilderResource.ResourceType, out string builderResourceBuildServiceBuilderApiVersion); - _builderResourceBuildServiceBuilderRestClient = new BuildServiceBuilderRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, builderResourceBuildServiceBuilderApiVersion); + _appBuilderResourceBuildServiceBuilderClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", AppBuilderResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AppBuilderResource.ResourceType, out string appBuilderResourceBuildServiceBuilderApiVersion); + _appBuilderResourceBuildServiceBuilderRestClient = new BuildServiceBuilderRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appBuilderResourceBuildServiceBuilderApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -49,8 +49,8 @@ internal BuilderResourceCollection(ArmClient client, ResourceIdentifier id) : ba internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != BuildServiceResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, BuildServiceResource.ResourceType), nameof(id)); + if (id.ResourceType != AppBuildServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AppBuildServiceResource.ResourceType), nameof(id)); } /// @@ -64,17 +64,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// 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 builderName, BuilderResourceData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string builderName, AppBuilderResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResourceCollection.CreateOrUpdate"); + using var scope = _appBuilderResourceBuildServiceBuilderClientDiagnostics.CreateScope("AppBuilderResourceCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _builderResourceBuildServiceBuilderRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, builderName, data, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(new BuilderResourceOperationSource(Client), _builderResourceBuildServiceBuilderClientDiagnostics, Pipeline, _builderResourceBuildServiceBuilderRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, builderName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appBuilderResourceBuildServiceBuilderRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, builderName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new AppBuilderResourceOperationSource(Client), _appBuilderResourceBuildServiceBuilderClientDiagnostics, Pipeline, _appBuilderResourceBuildServiceBuilderRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, builderName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -97,17 +97,17 @@ public virtual async Task> CreateOrUpdateAsync(Wai /// 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 builderName, BuilderResourceData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string builderName, AppBuilderResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResourceCollection.CreateOrUpdate"); + using var scope = _appBuilderResourceBuildServiceBuilderClientDiagnostics.CreateScope("AppBuilderResourceCollection.CreateOrUpdate"); scope.Start(); try { - var response = _builderResourceBuildServiceBuilderRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, builderName, data, cancellationToken); - var operation = new AppPlatformArmOperation(new BuilderResourceOperationSource(Client), _builderResourceBuildServiceBuilderClientDiagnostics, Pipeline, _builderResourceBuildServiceBuilderRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, builderName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appBuilderResourceBuildServiceBuilderRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, builderName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new AppBuilderResourceOperationSource(Client), _appBuilderResourceBuildServiceBuilderClientDiagnostics, Pipeline, _appBuilderResourceBuildServiceBuilderRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, builderName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -128,18 +128,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string builderName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string builderName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); - using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResourceCollection.Get"); + using var scope = _appBuilderResourceBuildServiceBuilderClientDiagnostics.CreateScope("AppBuilderResourceCollection.Get"); scope.Start(); try { - var response = await _builderResourceBuildServiceBuilderRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, builderName, cancellationToken).ConfigureAwait(false); + var response = await _appBuilderResourceBuildServiceBuilderRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, builderName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new BuilderResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppBuilderResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -157,18 +157,18 @@ public virtual async Task> GetAsync(string builderName /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string builderName, CancellationToken cancellationToken = default) + public virtual Response Get(string builderName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); - using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResourceCollection.Get"); + using var scope = _appBuilderResourceBuildServiceBuilderClientDiagnostics.CreateScope("AppBuilderResourceCollection.Get"); scope.Start(); try { - var response = _builderResourceBuildServiceBuilderRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, builderName, cancellationToken); + var response = _appBuilderResourceBuildServiceBuilderRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, builderName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new BuilderResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppBuilderResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -183,17 +183,17 @@ public virtual Response Get(string builderName, CancellationTok /// Operation Id: BuildServiceBuilder_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) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { - using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResourceCollection.GetAll"); + using var scope = _appBuilderResourceBuildServiceBuilderClientDiagnostics.CreateScope("AppBuilderResourceCollection.GetAll"); scope.Start(); try { - var response = await _builderResourceBuildServiceBuilderRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new BuilderResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = await _appBuilderResourceBuildServiceBuilderRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new AppBuilderResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -201,14 +201,14 @@ async Task> FirstPageFunc(int? pageSizeHint) throw; } } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) + async Task> NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResourceCollection.GetAll"); + using var scope = _appBuilderResourceBuildServiceBuilderClientDiagnostics.CreateScope("AppBuilderResourceCollection.GetAll"); scope.Start(); try { - var response = await _builderResourceBuildServiceBuilderRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new BuilderResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = await _appBuilderResourceBuildServiceBuilderRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new AppBuilderResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -225,17 +225,17 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHin /// Operation Id: BuildServiceBuilder_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) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { - using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResourceCollection.GetAll"); + using var scope = _appBuilderResourceBuildServiceBuilderClientDiagnostics.CreateScope("AppBuilderResourceCollection.GetAll"); scope.Start(); try { - var response = _builderResourceBuildServiceBuilderRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new BuilderResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = _appBuilderResourceBuildServiceBuilderRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AppBuilderResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -243,14 +243,14 @@ Page FirstPageFunc(int? pageSizeHint) throw; } } - Page NextPageFunc(string nextLink, int? pageSizeHint) + Page NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResourceCollection.GetAll"); + using var scope = _appBuilderResourceBuildServiceBuilderClientDiagnostics.CreateScope("AppBuilderResourceCollection.GetAll"); scope.Start(); try { - var response = _builderResourceBuildServiceBuilderRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new BuilderResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = _appBuilderResourceBuildServiceBuilderRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AppBuilderResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -274,11 +274,11 @@ public virtual async Task> ExistsAsync(string builderName, Cancel { Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); - using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResourceCollection.Exists"); + using var scope = _appBuilderResourceBuildServiceBuilderClientDiagnostics.CreateScope("AppBuilderResourceCollection.Exists"); scope.Start(); try { - var response = await _builderResourceBuildServiceBuilderRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, builderName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _appBuilderResourceBuildServiceBuilderRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, builderName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -301,11 +301,11 @@ public virtual Response Exists(string builderName, CancellationToken cance { Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); - using var scope = _builderResourceBuildServiceBuilderClientDiagnostics.CreateScope("BuilderResourceCollection.Exists"); + using var scope = _appBuilderResourceBuildServiceBuilderClientDiagnostics.CreateScope("AppBuilderResourceCollection.Exists"); scope.Start(); try { - var response = _builderResourceBuildServiceBuilderRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, builderName, cancellationToken: cancellationToken); + var response = _appBuilderResourceBuildServiceBuilderRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, builderName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -315,7 +315,7 @@ public virtual Response Exists(string builderName, CancellationToken cance } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -325,7 +325,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuilderResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuilderResourceData.cs similarity index 54% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuilderResourceData.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuilderResourceData.cs index 7c2d99a014c3a..bc5ea195b0300 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuilderResourceData.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuilderResourceData.cs @@ -11,26 +11,26 @@ namespace Azure.ResourceManager.AppPlatform { - /// A class representing the BuilderResource data model. - public partial class BuilderResourceData : ResourceData + /// A class representing the AppBuilderResource data model. + public partial class AppBuilderResourceData : ResourceData { - /// Initializes a new instance of BuilderResourceData. - public BuilderResourceData() + /// Initializes a new instance of AppBuilderResourceData. + public AppBuilderResourceData() { } - /// Initializes a new instance of BuilderResourceData. + /// Initializes a new instance of AppBuilderResourceData. /// The id. /// The name. /// The resourceType. /// The systemData. /// Property of the Builder resource. - internal BuilderResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, BuilderProperties properties) : base(id, name, resourceType, systemData) + internal AppBuilderResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AppBuilderProperties properties) : base(id, name, resourceType, systemData) { Properties = properties; } /// Property of the Builder resource. - public BuilderProperties Properties { get; set; } + public AppBuilderProperties Properties { get; set; } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DeploymentResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppDeploymentResource.cs similarity index 68% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DeploymentResource.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppDeploymentResource.cs index 3c1ed61f31511..9557600cd2812 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DeploymentResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppDeploymentResource.cs @@ -18,46 +18,46 @@ namespace Azure.ResourceManager.AppPlatform { /// - /// A Class representing a DeploymentResource 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 GetDeploymentResource method. - /// Otherwise you can get one from its parent resource using the GetDeploymentResource method. + /// A Class representing an AppDeploymentResource 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 GetAppDeploymentResource method. + /// Otherwise you can get one from its parent resource using the GetAppDeploymentResource method. /// - public partial class DeploymentResource : ArmResource + public partial class AppDeploymentResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _deploymentResourceDeploymentsClientDiagnostics; - private readonly DeploymentsRestOperations _deploymentResourceDeploymentsRestClient; - private readonly DeploymentResourceData _data; + private readonly ClientDiagnostics _appDeploymentResourceDeploymentsClientDiagnostics; + private readonly DeploymentsRestOperations _appDeploymentResourceDeploymentsRestClient; + private readonly AppDeploymentResourceData _data; - /// Initializes a new instance of the class for mocking. - protected DeploymentResource() + /// Initializes a new instance of the class for mocking. + protected AppDeploymentResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal DeploymentResource(ArmClient client, DeploymentResourceData data) : this(client, data.Id) + internal AppDeploymentResource(ArmClient client, AppDeploymentResourceData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// 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 DeploymentResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal AppDeploymentResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _deploymentResourceDeploymentsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string deploymentResourceDeploymentsApiVersion); - _deploymentResourceDeploymentsRestClient = new DeploymentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, deploymentResourceDeploymentsApiVersion); + _appDeploymentResourceDeploymentsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string appDeploymentResourceDeploymentsApiVersion); + _appDeploymentResourceDeploymentsRestClient = new DeploymentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appDeploymentResourceDeploymentsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -71,7 +71,7 @@ internal DeploymentResource(ArmClient client, ResourceIdentifier id) : base(clie /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual DeploymentResourceData Data + public virtual AppDeploymentResourceData Data { get { @@ -93,16 +93,16 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// Operation Id: Deployments_Get /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.Get"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.Get"); scope.Start(); try { - var response = await _deploymentResourceDeploymentsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _appDeploymentResourceDeploymentsRestClient.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 DeploymentResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppDeploymentResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -117,16 +117,16 @@ public virtual async Task> GetAsync(CancellationTok /// Operation Id: Deployments_Get /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.Get"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.Get"); scope.Start(); try { - var response = _deploymentResourceDeploymentsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var response = _appDeploymentResourceDeploymentsRestClient.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 DeploymentResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppDeploymentResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -144,12 +144,12 @@ public virtual Response Get(CancellationToken cancellationTo /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.Delete"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.Delete"); scope.Start(); try { - var response = await _deploymentResourceDeploymentsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appDeploymentResourceDeploymentsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -170,12 +170,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.Delete"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.Delete"); scope.Start(); try { - var response = _deploymentResourceDeploymentsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appDeploymentResourceDeploymentsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -196,16 +196,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// Parameters for the update operation. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DeploymentResourceData data, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, AppDeploymentResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.Update"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.Update"); scope.Start(); try { - var response = await _deploymentResourceDeploymentsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(new DeploymentResourceOperationSource(Client), _deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appDeploymentResourceDeploymentsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new AppDeploymentResourceOperationSource(Client), _appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -226,16 +226,16 @@ public virtual async Task> UpdateAsync(WaitUnti /// Parameters for the update operation. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DeploymentResourceData data, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, AppDeploymentResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.Update"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.Update"); scope.Start(); try { - var response = _deploymentResourceDeploymentsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new AppPlatformArmOperation(new DeploymentResourceOperationSource(Client), _deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appDeploymentResourceDeploymentsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new AppDeploymentResourceOperationSource(Client), _appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -256,12 +256,12 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Depl /// The cancellation token to use. public virtual async Task StartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.Start"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.Start"); scope.Start(); try { - var response = await _deploymentResourceDeploymentsRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appDeploymentResourceDeploymentsRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -282,12 +282,12 @@ public virtual async Task StartAsync(WaitUntil waitUntil, Cancella /// The cancellation token to use. public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.Start"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.Start"); scope.Start(); try { - var response = _deploymentResourceDeploymentsRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appDeploymentResourceDeploymentsRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -308,12 +308,12 @@ public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancell /// The cancellation token to use. public virtual async Task StopAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.Stop"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.Stop"); scope.Start(); try { - var response = await _deploymentResourceDeploymentsRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appDeploymentResourceDeploymentsRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -334,12 +334,12 @@ public virtual async Task StopAsync(WaitUntil waitUntil, Cancellat /// The cancellation token to use. public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.Stop"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.Stop"); scope.Start(); try { - var response = _deploymentResourceDeploymentsRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appDeploymentResourceDeploymentsRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -360,12 +360,12 @@ public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancella /// The cancellation token to use. public virtual async Task RestartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.Restart"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.Restart"); scope.Start(); try { - var response = await _deploymentResourceDeploymentsRestClient.RestartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appDeploymentResourceDeploymentsRestClient.RestartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -386,12 +386,12 @@ public virtual async Task RestartAsync(WaitUntil waitUntil, Cancel /// The cancellation token to use. public virtual ArmOperation Restart(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.Restart"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.Restart"); scope.Start(); try { - var response = _deploymentResourceDeploymentsRestClient.Restart(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appDeploymentResourceDeploymentsRestClient.Restart(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -411,11 +411,11 @@ public virtual ArmOperation Restart(WaitUntil waitUntil, CancellationToken cance /// The cancellation token to use. public virtual async Task> GetLogFileUrlAsync(CancellationToken cancellationToken = default) { - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.GetLogFileUrl"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.GetLogFileUrl"); scope.Start(); try { - var response = await _deploymentResourceDeploymentsRestClient.GetLogFileUrlAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _appDeploymentResourceDeploymentsRestClient.GetLogFileUrlAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -433,11 +433,11 @@ public virtual async Task> GetLogFileUrlAsync(Cance /// The cancellation token to use. public virtual Response GetLogFileUrl(CancellationToken cancellationToken = default) { - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.GetLogFileUrl"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.GetLogFileUrl"); scope.Start(); try { - var response = _deploymentResourceDeploymentsRestClient.GetLogFileUrl(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var response = _appDeploymentResourceDeploymentsRestClient.GetLogFileUrl(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -460,12 +460,12 @@ public virtual async Task GenerateHeapDumpAsync(WaitUntil waitUnti { Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.GenerateHeapDump"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.GenerateHeapDump"); scope.Start(); try { - var response = await _deploymentResourceDeploymentsRestClient.GenerateHeapDumpAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateGenerateHeapDumpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appDeploymentResourceDeploymentsRestClient.GenerateHeapDumpAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateGenerateHeapDumpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -490,12 +490,12 @@ public virtual ArmOperation GenerateHeapDump(WaitUntil waitUntil, DiagnosticPara { Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.GenerateHeapDump"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.GenerateHeapDump"); scope.Start(); try { - var response = _deploymentResourceDeploymentsRestClient.GenerateHeapDump(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken); - var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateGenerateHeapDumpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appDeploymentResourceDeploymentsRestClient.GenerateHeapDump(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken); + var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateGenerateHeapDumpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -520,12 +520,12 @@ public virtual async Task GenerateThreadDumpAsync(WaitUntil waitUn { Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.GenerateThreadDump"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.GenerateThreadDump"); scope.Start(); try { - var response = await _deploymentResourceDeploymentsRestClient.GenerateThreadDumpAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateGenerateThreadDumpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appDeploymentResourceDeploymentsRestClient.GenerateThreadDumpAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateGenerateThreadDumpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -550,12 +550,12 @@ public virtual ArmOperation GenerateThreadDump(WaitUntil waitUntil, DiagnosticPa { Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.GenerateThreadDump"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.GenerateThreadDump"); scope.Start(); try { - var response = _deploymentResourceDeploymentsRestClient.GenerateThreadDump(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken); - var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateGenerateThreadDumpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appDeploymentResourceDeploymentsRestClient.GenerateThreadDump(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken); + var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateGenerateThreadDumpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -580,12 +580,12 @@ public virtual async Task StartJFRAsync(WaitUntil waitUntil, Diagn { Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.StartJFR"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.StartJFR"); scope.Start(); try { - var response = await _deploymentResourceDeploymentsRestClient.StartJFRAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateStartJFRRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appDeploymentResourceDeploymentsRestClient.StartJFRAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateStartJFRRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -610,12 +610,12 @@ public virtual ArmOperation StartJFR(WaitUntil waitUntil, DiagnosticParameters d { Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResource.StartJFR"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.StartJFR"); scope.Start(); try { - var response = _deploymentResourceDeploymentsRestClient.StartJFR(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken); - var operation = new AppPlatformArmOperation(_deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateStartJFRRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appDeploymentResourceDeploymentsRestClient.StartJFR(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken); + var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateStartJFRRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DeploymentResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppDeploymentResourceCollection.cs similarity index 60% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DeploymentResourceCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppDeploymentResourceCollection.cs index 9b881efd7cffa..f1935a1edbda2 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DeploymentResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppDeploymentResourceCollection.cs @@ -20,28 +20,28 @@ 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 GetDeploymentResources method from an instance of . + /// 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 GetAppDeploymentResources method from an instance of . /// - public partial class DeploymentResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class AppDeploymentResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _deploymentResourceDeploymentsClientDiagnostics; - private readonly DeploymentsRestOperations _deploymentResourceDeploymentsRestClient; + private readonly ClientDiagnostics _appDeploymentResourceDeploymentsClientDiagnostics; + private readonly DeploymentsRestOperations _appDeploymentResourceDeploymentsRestClient; - /// Initializes a new instance of the class for mocking. - protected DeploymentResourceCollection() + /// Initializes a new instance of the class for mocking. + protected AppDeploymentResourceCollection() { } - /// Initializes a new instance of the class. + /// 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 DeploymentResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal AppDeploymentResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _deploymentResourceDeploymentsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", DeploymentResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DeploymentResource.ResourceType, out string deploymentResourceDeploymentsApiVersion); - _deploymentResourceDeploymentsRestClient = new DeploymentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, deploymentResourceDeploymentsApiVersion); + _appDeploymentResourceDeploymentsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", AppDeploymentResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AppDeploymentResource.ResourceType, out string appDeploymentResourceDeploymentsApiVersion); + _appDeploymentResourceDeploymentsRestClient = new DeploymentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appDeploymentResourceDeploymentsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -64,17 +64,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// 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 deploymentName, DeploymentResourceData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string deploymentName, AppDeploymentResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResourceCollection.CreateOrUpdate"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResourceCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _deploymentResourceDeploymentsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(new DeploymentResourceOperationSource(Client), _deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appDeploymentResourceDeploymentsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new AppDeploymentResourceOperationSource(Client), _appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -97,17 +97,17 @@ public virtual async Task> CreateOrUpdateAsync( /// 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 deploymentName, DeploymentResourceData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string deploymentName, AppDeploymentResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResourceCollection.CreateOrUpdate"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResourceCollection.CreateOrUpdate"); scope.Start(); try { - var response = _deploymentResourceDeploymentsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data, cancellationToken); - var operation = new AppPlatformArmOperation(new DeploymentResourceOperationSource(Client), _deploymentResourceDeploymentsClientDiagnostics, Pipeline, _deploymentResourceDeploymentsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appDeploymentResourceDeploymentsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new AppDeploymentResourceOperationSource(Client), _appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -128,18 +128,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string deploymentName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string deploymentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResourceCollection.Get"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResourceCollection.Get"); scope.Start(); try { - var response = await _deploymentResourceDeploymentsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, cancellationToken).ConfigureAwait(false); + var response = await _appDeploymentResourceDeploymentsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DeploymentResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppDeploymentResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -157,18 +157,18 @@ public virtual async Task> GetAsync(string deployme /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string deploymentName, CancellationToken cancellationToken = default) + public virtual Response Get(string deploymentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResourceCollection.Get"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResourceCollection.Get"); scope.Start(); try { - var response = _deploymentResourceDeploymentsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, cancellationToken); + var response = _appDeploymentResourceDeploymentsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DeploymentResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppDeploymentResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -184,17 +184,17 @@ public virtual Response Get(string deploymentName, Cancellat /// /// Version of the deployments to be listed. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(IEnumerable version = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(IEnumerable version = null, CancellationToken cancellationToken = default) { - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResourceCollection.GetAll"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResourceCollection.GetAll"); scope.Start(); try { - var response = await _deploymentResourceDeploymentsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new DeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = await _appDeploymentResourceDeploymentsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new AppDeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -202,14 +202,14 @@ async Task> FirstPageFunc(int? pageSizeHint) throw; } } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) + async Task> NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResourceCollection.GetAll"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResourceCollection.GetAll"); scope.Start(); try { - var response = await _deploymentResourceDeploymentsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new DeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = await _appDeploymentResourceDeploymentsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new AppDeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -227,17 +227,17 @@ async Task> NextPageFunc(string nextLink, int? pageSize /// /// Version of the deployments to be listed. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(IEnumerable version = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(IEnumerable version = null, CancellationToken cancellationToken = default) { - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResourceCollection.GetAll"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResourceCollection.GetAll"); scope.Start(); try { - var response = _deploymentResourceDeploymentsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new DeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = _appDeploymentResourceDeploymentsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AppDeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -245,14 +245,14 @@ Page FirstPageFunc(int? pageSizeHint) throw; } } - Page NextPageFunc(string nextLink, int? pageSizeHint) + Page NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResourceCollection.GetAll"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResourceCollection.GetAll"); scope.Start(); try { - var response = _deploymentResourceDeploymentsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new DeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = _appDeploymentResourceDeploymentsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AppDeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -276,11 +276,11 @@ public virtual async Task> ExistsAsync(string deploymentName, Can { Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResourceCollection.Exists"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResourceCollection.Exists"); scope.Start(); try { - var response = await _deploymentResourceDeploymentsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _appDeploymentResourceDeploymentsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -303,11 +303,11 @@ public virtual Response Exists(string deploymentName, CancellationToken ca { Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("DeploymentResourceCollection.Exists"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResourceCollection.Exists"); scope.Start(); try { - var response = _deploymentResourceDeploymentsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, cancellationToken: cancellationToken); + var response = _appDeploymentResourceDeploymentsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -317,7 +317,7 @@ public virtual Response Exists(string deploymentName, CancellationToken ca } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -327,7 +327,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DeploymentResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppDeploymentResourceData.cs similarity index 63% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DeploymentResourceData.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppDeploymentResourceData.cs index ad1d5390a4b46..ae46d0e5c74a6 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/DeploymentResourceData.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppDeploymentResourceData.cs @@ -11,22 +11,22 @@ namespace Azure.ResourceManager.AppPlatform { - /// A class representing the DeploymentResource data model. - public partial class DeploymentResourceData : ResourceData + /// A class representing the AppDeploymentResource data model. + public partial class AppDeploymentResourceData : ResourceData { - /// Initializes a new instance of DeploymentResourceData. - public DeploymentResourceData() + /// Initializes a new instance of AppDeploymentResourceData. + public AppDeploymentResourceData() { } - /// Initializes a new instance of DeploymentResourceData. + /// Initializes a new instance of AppDeploymentResourceData. /// The id. /// The name. /// The resourceType. /// The systemData. /// Properties of the Deployment resource. /// Sku of the Deployment resource. - internal DeploymentResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DeploymentResourceProperties properties, AppPlatformSku sku) : base(id, name, resourceType, systemData) + internal AppDeploymentResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DeploymentResourceProperties properties, AppPlatformSku sku) : base(id, name, resourceType, systemData) { Properties = properties; Sku = sku; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppResource.cs index ab6be3583a66a..d03af0f015859 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppResource.cs @@ -161,11 +161,11 @@ public virtual Response GetCustomDomainResource(string dom return GetCustomDomainResources().Get(domainName, cancellationToken); } - /// Gets a collection of DeploymentResources in the AppResource. - /// An object representing collection of DeploymentResources and their operations over a DeploymentResource. - public virtual DeploymentResourceCollection GetDeploymentResources() + /// Gets a collection of AppDeploymentResources in the AppResource. + /// An object representing collection of AppDeploymentResources and their operations over a AppDeploymentResource. + public virtual AppDeploymentResourceCollection GetAppDeploymentResources() { - return GetCachedClient(Client => new DeploymentResourceCollection(Client, Id)); + return GetCachedClient(Client => new AppDeploymentResourceCollection(Client, Id)); } /// @@ -178,9 +178,9 @@ public virtual DeploymentResourceCollection GetDeploymentResources() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetDeploymentResourceAsync(string deploymentName, CancellationToken cancellationToken = default) + public virtual async Task> GetAppDeploymentResourceAsync(string deploymentName, CancellationToken cancellationToken = default) { - return await GetDeploymentResources().GetAsync(deploymentName, cancellationToken).ConfigureAwait(false); + return await GetAppDeploymentResources().GetAsync(deploymentName, cancellationToken).ConfigureAwait(false); } /// @@ -193,9 +193,9 @@ public virtual async Task> GetDeploymentResourceAsy /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetDeploymentResource(string deploymentName, CancellationToken cancellationToken = default) + public virtual Response GetAppDeploymentResource(string deploymentName, CancellationToken cancellationToken = default) { - return GetDeploymentResources().Get(deploymentName, cancellationToken); + return GetAppDeploymentResources().Get(deploymentName, cancellationToken); } /// @@ -413,7 +413,7 @@ public virtual Response GetResourceUploadUrl(Cancellat /// A list of Deployment name to be active. /// The cancellation token to use. /// is null. - public virtual async Task> SetActiveDeploymentsAsync(WaitUntil waitUntil, ActiveDeploymentCollection activeDeploymentCollection, CancellationToken cancellationToken = default) + public virtual async Task> SetActiveDeploymentsAsync(WaitUntil waitUntil, ActiveDeploymentList activeDeploymentCollection, CancellationToken cancellationToken = default) { Argument.AssertNotNull(activeDeploymentCollection, nameof(activeDeploymentCollection)); @@ -443,7 +443,7 @@ public virtual async Task> SetActiveDeploymentsAsync(W /// A list of Deployment name to be active. /// The cancellation token to use. /// is null. - public virtual ArmOperation SetActiveDeployments(WaitUntil waitUntil, ActiveDeploymentCollection activeDeploymentCollection, CancellationToken cancellationToken = default) + public virtual ArmOperation SetActiveDeployments(WaitUntil waitUntil, ActiveDeploymentList activeDeploymentCollection, CancellationToken cancellationToken = default) { Argument.AssertNotNull(activeDeploymentCollection, nameof(activeDeploymentCollection)); diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildpackBindingResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildpackBindingResource.cs index aac54e159590f..0b7cec626a8b5 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildpackBindingResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildpackBindingResource.cs @@ -20,7 +20,7 @@ namespace Azure.ResourceManager.AppPlatform /// A Class representing a BuildpackBindingResource 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 GetBuildpackBindingResource method. - /// Otherwise you can get one from its parent resource using the GetBuildpackBindingResource method. + /// Otherwise you can get one from its parent resource using the GetBuildpackBindingResource method. /// public partial class BuildpackBindingResource : ArmResource { diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildpackBindingResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildpackBindingResourceCollection.cs index 454c0de8ab073..99a206419b7fe 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildpackBindingResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BuildpackBindingResourceCollection.cs @@ -21,8 +21,8 @@ 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 GetBuildpackBindingResources method from an instance of . + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetBuildpackBindingResources method from an instance of . /// public partial class BuildpackBindingResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable { @@ -49,8 +49,8 @@ internal BuildpackBindingResourceCollection(ArmClient client, ResourceIdentifier internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != BuilderResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, BuilderResource.ResourceType), nameof(id)); + if (id.ResourceType != AppBuilderResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AppBuilderResource.ResourceType), nameof(id)); } /// 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 904291f1fe8df..5af23464ee5d7 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/AppPlatformExtensions.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/AppPlatformExtensions.cs @@ -274,58 +274,58 @@ public static ServiceRegistryResource GetServiceRegistryResource(this ArmClient } #endregion - #region BuildServiceResource + #region AppBuildServiceResource /// - /// 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. + /// 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 BuildServiceResource GetBuildServiceResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AppBuildServiceResource GetAppBuildServiceResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - BuildServiceResource.ValidateResourceId(id); - return new BuildServiceResource(client, id); + AppBuildServiceResource.ValidateResourceId(id); + return new AppBuildServiceResource(client, id); } ); } #endregion - #region BuildResource + #region AppBuildResource /// - /// 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. + /// 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 BuildResource GetBuildResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AppBuildResource GetAppBuildResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - BuildResource.ValidateResourceId(id); - return new BuildResource(client, id); + AppBuildResource.ValidateResourceId(id); + return new AppBuildResource(client, id); } ); } #endregion - #region BuildResultResource + #region AppBuildResultResource /// - /// 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. + /// 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 BuildResultResource GetBuildResultResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AppBuildResultResource GetAppBuildResultResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - BuildResultResource.ValidateResourceId(id); - return new BuildResultResource(client, id); + AppBuildResultResource.ValidateResourceId(id); + return new AppBuildResultResource(client, id); } ); } @@ -388,39 +388,39 @@ public static BuildpackBindingResource GetBuildpackBindingResource(this ArmClien } #endregion - #region BuilderResource + #region AppBuilderResource /// - /// 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. + /// 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 BuilderResource GetBuilderResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AppBuilderResource GetAppBuilderResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - BuilderResource.ValidateResourceId(id); - return new BuilderResource(client, id); + AppBuilderResource.ValidateResourceId(id); + return new AppBuilderResource(client, id); } ); } #endregion - #region BuildServiceAgentPoolResource + #region AppBuildServiceAgentPoolResource /// - /// 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. + /// 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 BuildServiceAgentPoolResource GetBuildServiceAgentPoolResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AppBuildServiceAgentPoolResource GetAppBuildServiceAgentPoolResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - BuildServiceAgentPoolResource.ValidateResourceId(id); - return new BuildServiceAgentPoolResource(client, id); + AppBuildServiceAgentPoolResource.ValidateResourceId(id); + return new AppBuildServiceAgentPoolResource(client, id); } ); } @@ -540,20 +540,20 @@ public static CustomDomainResource GetCustomDomainResource(this ArmClient client } #endregion - #region DeploymentResource + #region AppDeploymentResource /// - /// 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. + /// 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 DeploymentResource GetDeploymentResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AppDeploymentResource GetAppDeploymentResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - DeploymentResource.ValidateResourceId(id); - return new DeploymentResource(client, id); + AppDeploymentResource.ValidateResourceId(id); + return new AppDeploymentResource(client, id); } ); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppBuildServiceAgentPoolResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppBuildServiceAgentPoolResourceOperationSource.cs new file mode 100644 index 0000000000000..6deafcf67a84c --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppBuildServiceAgentPoolResourceOperationSource.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 AppBuildServiceAgentPoolResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal AppBuildServiceAgentPoolResourceOperationSource(ArmClient client) + { + _client = client; + } + + AppBuildServiceAgentPoolResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = AppBuildServiceAgentPoolResourceData.DeserializeAppBuildServiceAgentPoolResourceData(document.RootElement); + return new AppBuildServiceAgentPoolResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = AppBuildServiceAgentPoolResourceData.DeserializeAppBuildServiceAgentPoolResourceData(document.RootElement); + return new AppBuildServiceAgentPoolResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/DeploymentResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppBuilderResourceOperationSource.cs similarity index 54% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/DeploymentResourceOperationSource.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppBuilderResourceOperationSource.cs index 28deca116a291..f9efc4294ecbc 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/DeploymentResourceOperationSource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppBuilderResourceOperationSource.cs @@ -14,27 +14,27 @@ namespace Azure.ResourceManager.AppPlatform { - internal class DeploymentResourceOperationSource : IOperationSource + internal class AppBuilderResourceOperationSource : IOperationSource { private readonly ArmClient _client; - internal DeploymentResourceOperationSource(ArmClient client) + internal AppBuilderResourceOperationSource(ArmClient client) { _client = client; } - DeploymentResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + AppBuilderResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) { using var document = JsonDocument.Parse(response.ContentStream); - var data = DeploymentResourceData.DeserializeDeploymentResourceData(document.RootElement); - return new DeploymentResource(_client, data); + var data = AppBuilderResourceData.DeserializeAppBuilderResourceData(document.RootElement); + return new AppBuilderResource(_client, data); } - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = DeploymentResourceData.DeserializeDeploymentResourceData(document.RootElement); - return new DeploymentResource(_client, data); + var data = AppBuilderResourceData.DeserializeAppBuilderResourceData(document.RootElement); + return new AppBuilderResource(_client, data); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppDeploymentResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppDeploymentResourceOperationSource.cs new file mode 100644 index 0000000000000..87d2878758e94 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppDeploymentResourceOperationSource.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 AppDeploymentResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal AppDeploymentResourceOperationSource(ArmClient client) + { + _client = client; + } + + AppDeploymentResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = AppDeploymentResourceData.DeserializeAppDeploymentResourceData(document.RootElement); + return new AppDeploymentResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = AppDeploymentResourceData.DeserializeAppDeploymentResourceData(document.RootElement); + return new AppDeploymentResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/BuildServiceAgentPoolResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/BuildServiceAgentPoolResourceOperationSource.cs deleted file mode 100644 index 38b835cfe0924..0000000000000 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/BuildServiceAgentPoolResourceOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// 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 BuildServiceAgentPoolResourceOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal BuildServiceAgentPoolResourceOperationSource(ArmClient client) - { - _client = client; - } - - BuildServiceAgentPoolResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = BuildServiceAgentPoolResourceData.DeserializeBuildServiceAgentPoolResourceData(document.RootElement); - return new BuildServiceAgentPoolResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = BuildServiceAgentPoolResourceData.DeserializeBuildServiceAgentPoolResourceData(document.RootElement); - return new BuildServiceAgentPoolResource(_client, data); - } - } -} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/BuilderResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/BuilderResourceOperationSource.cs deleted file mode 100644 index 8087507ea069a..0000000000000 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/BuilderResourceOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// 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 BuilderResourceOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal BuilderResourceOperationSource(ArmClient client) - { - _client = client; - } - - BuilderResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = BuilderResourceData.DeserializeBuilderResourceData(document.RootElement); - return new BuilderResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = BuilderResourceData.DeserializeBuilderResourceData(document.RootElement); - return new BuilderResource(_client, data); - } - } -} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ActiveDeploymentCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ActiveDeploymentList.Serialization.cs similarity index 91% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ActiveDeploymentCollection.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ActiveDeploymentList.Serialization.cs index 254b08d2a1464..064e3d4f67700 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ActiveDeploymentCollection.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ActiveDeploymentList.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.AppPlatform.Models { - public partial class ActiveDeploymentCollection : IUtf8JsonSerializable + public partial class ActiveDeploymentList : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ActiveDeploymentCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ActiveDeploymentList.cs similarity index 84% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ActiveDeploymentCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ActiveDeploymentList.cs index e5e6b8f19069e..1ab115c362685 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ActiveDeploymentCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ActiveDeploymentList.cs @@ -11,10 +11,10 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Object that includes an array of Deployment resource name and set them as active. - public partial class ActiveDeploymentCollection + public partial class ActiveDeploymentList { - /// Initializes a new instance of ActiveDeploymentCollection. - public ActiveDeploymentCollection() + /// Initializes a new instance of ActiveDeploymentList. + public ActiveDeploymentList() { ActiveDeploymentNames = new ChangeTrackingList(); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainResourceList.Serialization.cs similarity index 82% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainResourceCollection.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainResourceList.Serialization.cs index 084d2be1f0c11..43b54c2176341 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainResourceCollection.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainResourceList.Serialization.cs @@ -12,9 +12,9 @@ namespace Azure.ResourceManager.AppPlatform.Models { - internal partial class ApiPortalCustomDomainResourceCollection + internal partial class ApiPortalCustomDomainResourceList { - internal static ApiPortalCustomDomainResourceCollection DeserializeApiPortalCustomDomainResourceCollection(JsonElement element) + internal static ApiPortalCustomDomainResourceList DeserializeApiPortalCustomDomainResourceList(JsonElement element) { Optional> value = default; Optional nextLink = default; @@ -41,7 +41,7 @@ internal static ApiPortalCustomDomainResourceCollection DeserializeApiPortalCust continue; } } - return new ApiPortalCustomDomainResourceCollection(Optional.ToList(value), nextLink.Value); + return new ApiPortalCustomDomainResourceList(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainResourceList.cs similarity index 80% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainResourceCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainResourceList.cs index b7e3f9f28e7cc..412f8671fdb64 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalCustomDomainResourceList.cs @@ -12,21 +12,21 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Object that includes an array of API portal custom domain resources and a possible link for next set. - internal partial class ApiPortalCustomDomainResourceCollection + internal partial class ApiPortalCustomDomainResourceList { - /// Initializes a new instance of ApiPortalCustomDomainResourceCollection. - internal ApiPortalCustomDomainResourceCollection() + /// Initializes a new instance of ApiPortalCustomDomainResourceList. + internal ApiPortalCustomDomainResourceList() { Value = new ChangeTrackingList(); } - /// Initializes a new instance of ApiPortalCustomDomainResourceCollection. + /// Initializes a new instance of ApiPortalCustomDomainResourceList. /// Collection of API portal custom domain resources. /// /// URL client should use to fetch the next page (per server side paging). /// It's null for now, added for future use. /// - internal ApiPortalCustomDomainResourceCollection(IReadOnlyList value, string nextLink) + internal ApiPortalCustomDomainResourceList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceList.Serialization.cs similarity index 84% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceCollection.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceList.Serialization.cs index 77899a28df189..2c1a0964d81b8 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceCollection.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceList.Serialization.cs @@ -12,9 +12,9 @@ namespace Azure.ResourceManager.AppPlatform.Models { - internal partial class ApiPortalResourceCollection + internal partial class ApiPortalResourceList { - internal static ApiPortalResourceCollection DeserializeApiPortalResourceCollection(JsonElement element) + internal static ApiPortalResourceList DeserializeApiPortalResourceList(JsonElement element) { Optional> value = default; Optional nextLink = default; @@ -41,7 +41,7 @@ internal static ApiPortalResourceCollection DeserializeApiPortalResourceCollecti continue; } } - return new ApiPortalResourceCollection(Optional.ToList(value), nextLink.Value); + return new ApiPortalResourceList(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceList.cs similarity index 83% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceList.cs index a620d523fd4a6..3a1d0fcb73e18 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalResourceList.cs @@ -12,21 +12,21 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Object that includes an array of API portal resources and a possible link for next set. - internal partial class ApiPortalResourceCollection + internal partial class ApiPortalResourceList { - /// Initializes a new instance of ApiPortalResourceCollection. - internal ApiPortalResourceCollection() + /// Initializes a new instance of ApiPortalResourceList. + internal ApiPortalResourceList() { Value = new ChangeTrackingList(); } - /// Initializes a new instance of ApiPortalResourceCollection. + /// Initializes a new instance of ApiPortalResourceList. /// Collection of API 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 ApiPortalResourceCollection(IReadOnlyList value, string nextLink) + internal ApiPortalResourceList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildData.Serialization.cs similarity index 84% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildData.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildData.Serialization.cs index cfbf93987e112..90ba9771e5d51 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildData.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildData.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.AppPlatform { - public partial class BuildData : IUtf8JsonSerializable + public partial class AppBuildData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -25,9 +25,9 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static BuildData DeserializeBuildData(JsonElement element) + internal static AppBuildData DeserializeAppBuildData(JsonElement element) { - Optional properties = default; + Optional properties = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -41,7 +41,7 @@ internal static BuildData DeserializeBuildData(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - properties = BuildProperties.DeserializeBuildProperties(property.Value); + properties = AppBuildProperties.DeserializeAppBuildProperties(property.Value); continue; } if (property.NameEquals("id")) @@ -65,7 +65,7 @@ internal static BuildData DeserializeBuildData(JsonElement element) continue; } } - return new BuildData(id, name, type, systemData, properties.Value); + return new AppBuildData(id, name, type, systemData, properties.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildList.Serialization.cs similarity index 73% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildCollection.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildList.Serialization.cs index 03afe7bbcdf80..394f4a429dc97 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildCollection.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildList.Serialization.cs @@ -12,11 +12,11 @@ namespace Azure.ResourceManager.AppPlatform.Models { - internal partial class BuildCollection + internal partial class AppBuildList { - internal static BuildCollection DeserializeBuildCollection(JsonElement element) + internal static AppBuildList DeserializeAppBuildList(JsonElement element) { - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -27,10 +27,10 @@ internal static BuildCollection DeserializeBuildCollection(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(BuildData.DeserializeBuildData(item)); + array.Add(AppBuildData.DeserializeAppBuildData(item)); } value = array; continue; @@ -41,7 +41,7 @@ internal static BuildCollection DeserializeBuildCollection(JsonElement element) continue; } } - return new BuildCollection(Optional.ToList(value), nextLink.Value); + return new AppBuildList(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildList.cs similarity index 72% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildList.cs index f66c0575f13cf..9febde29468a6 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildList.cs @@ -12,28 +12,28 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Object that includes an array of Build resources and a possible link for next set. - internal partial class BuildCollection + internal partial class AppBuildList { - /// Initializes a new instance of BuildCollection. - internal BuildCollection() + /// Initializes a new instance of AppBuildList. + internal AppBuildList() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } - /// Initializes a new instance of BuildCollection. + /// Initializes a new instance of AppBuildList. /// Collection of Build resources. /// /// URL client should use to fetch the next page (per server side paging). /// It's null for now, added for future use. /// - internal BuildCollection(IReadOnlyList value, string nextLink) + internal AppBuildList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// Collection of Build resources. - public IReadOnlyList Value { get; } + 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. diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildProperties.Serialization.cs similarity index 88% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildProperties.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildProperties.Serialization.cs index 55e794d4eba23..9c19d49c3235d 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildProperties.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildProperties.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.AppPlatform.Models { - public partial class BuildProperties : IUtf8JsonSerializable + public partial class AppBuildProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -46,12 +46,12 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static BuildProperties DeserializeBuildProperties(JsonElement element) + internal static AppBuildProperties DeserializeAppBuildProperties(JsonElement element) { Optional relativePath = default; Optional builder = default; Optional agentPool = default; - Optional provisioningState = default; + Optional provisioningState = default; Optional> env = default; Optional triggeredBuildResult = default; foreach (var property in element.EnumerateObject()) @@ -78,7 +78,7 @@ internal static BuildProperties DeserializeBuildProperties(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - provisioningState = new BuildProvisioningState(property.Value.GetString()); + provisioningState = new AppBuildProvisioningState(property.Value.GetString()); continue; } if (property.NameEquals("env")) @@ -107,7 +107,7 @@ internal static BuildProperties DeserializeBuildProperties(JsonElement element) continue; } } - return new BuildProperties(relativePath.Value, builder.Value, agentPool.Value, Optional.ToNullable(provisioningState), Optional.ToDictionary(env), triggeredBuildResult); + return new AppBuildProperties(relativePath.Value, builder.Value, agentPool.Value, Optional.ToNullable(provisioningState), Optional.ToDictionary(env), triggeredBuildResult); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildProperties.cs similarity index 80% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildProperties.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildProperties.cs index 3ef18b9b3bc0f..2e003ac7a92d2 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildProperties.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildProperties.cs @@ -12,22 +12,22 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Build resource properties payload. - public partial class BuildProperties + public partial class AppBuildProperties { - /// Initializes a new instance of BuildProperties. - public BuildProperties() + /// Initializes a new instance of AppBuildProperties. + public AppBuildProperties() { Env = new ChangeTrackingDictionary(); } - /// Initializes a new instance of BuildProperties. + /// Initializes a new instance of AppBuildProperties. /// The relative path of source code. /// The resource id of builder to build the source code. /// The resource id of agent pool. /// Provisioning state of the KPack build result. /// The environment variables for this build. /// The build result triggered by this build. - internal BuildProperties(string relativePath, string builder, string agentPool, BuildProvisioningState? provisioningState, IDictionary env, SubResource triggeredBuildResult) + internal AppBuildProperties(string relativePath, string builder, string agentPool, AppBuildProvisioningState? provisioningState, IDictionary env, SubResource triggeredBuildResult) { RelativePath = relativePath; Builder = builder; @@ -44,7 +44,7 @@ internal BuildProperties(string relativePath, string builder, string agentPool, /// The resource id of agent pool. public string AgentPool { get; set; } /// Provisioning state of the KPack build result. - public BuildProvisioningState? ProvisioningState { get; } + public AppBuildProvisioningState? ProvisioningState { get; } /// The environment variables for this build. public IDictionary Env { get; } /// The build result triggered by this build. diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildProvisioningState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildProvisioningState.cs new file mode 100644 index 0000000000000..9c3b7a766ffdf --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildProvisioningState.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 +{ + /// Provisioning state of the KPack build result. + public readonly partial struct AppBuildProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AppBuildProvisioningState(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 AppBuildProvisioningState Creating { get; } = new AppBuildProvisioningState(CreatingValue); + /// Updating. + public static AppBuildProvisioningState Updating { get; } = new AppBuildProvisioningState(UpdatingValue); + /// Succeeded. + public static AppBuildProvisioningState Succeeded { get; } = new AppBuildProvisioningState(SucceededValue); + /// Failed. + public static AppBuildProvisioningState Failed { get; } = new AppBuildProvisioningState(FailedValue); + /// Deleting. + public static AppBuildProvisioningState Deleting { get; } = new AppBuildProvisioningState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(AppBuildProvisioningState left, AppBuildProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AppBuildProvisioningState left, AppBuildProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AppBuildProvisioningState(string value) => new AppBuildProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AppBuildProvisioningState other && Equals(other); + /// + public bool Equals(AppBuildProvisioningState 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/BuildResultData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildResultData.Serialization.cs similarity index 89% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultData.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildResultData.Serialization.cs index 7f52fc54c4378..09f8e0c76e7d4 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultData.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildResultData.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.AppPlatform { - public partial class BuildResultData : IUtf8JsonSerializable + public partial class AppBuildResultData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -25,7 +25,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static BuildResultData DeserializeBuildResultData(JsonElement element) + internal static AppBuildResultData DeserializeAppBuildResultData(JsonElement element) { Optional properties = default; ResourceIdentifier id = default; @@ -65,7 +65,7 @@ internal static BuildResultData DeserializeBuildResultData(JsonElement element) continue; } } - return new BuildResultData(id, name, type, systemData, properties.Value); + return new AppBuildResultData(id, name, type, systemData, properties.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildResultList.Serialization.cs similarity index 70% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultCollection.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildResultList.Serialization.cs index a8f5ba95c89bd..1ff326c0bd1e2 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultCollection.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildResultList.Serialization.cs @@ -12,11 +12,11 @@ namespace Azure.ResourceManager.AppPlatform.Models { - internal partial class BuildResultCollection + internal partial class AppBuildResultList { - internal static BuildResultCollection DeserializeBuildResultCollection(JsonElement element) + internal static AppBuildResultList DeserializeAppBuildResultList(JsonElement element) { - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -27,10 +27,10 @@ internal static BuildResultCollection DeserializeBuildResultCollection(JsonEleme property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(BuildResultData.DeserializeBuildResultData(item)); + array.Add(AppBuildResultData.DeserializeAppBuildResultData(item)); } value = array; continue; @@ -41,7 +41,7 @@ internal static BuildResultCollection DeserializeBuildResultCollection(JsonEleme continue; } } - return new BuildResultCollection(Optional.ToList(value), nextLink.Value); + return new AppBuildResultList(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildResultList.cs similarity index 71% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildResultList.cs index 18536d45ca7be..5c8c9d6ee570a 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildResultCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildResultList.cs @@ -12,28 +12,28 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Object that includes an array of Build result resources and a possible link for next set. - internal partial class BuildResultCollection + internal partial class AppBuildResultList { - /// Initializes a new instance of BuildResultCollection. - internal BuildResultCollection() + /// Initializes a new instance of AppBuildResultList. + internal AppBuildResultList() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } - /// Initializes a new instance of BuildResultCollection. + /// Initializes a new instance of AppBuildResultList. /// Collection of Build result resources. /// /// URL client should use to fetch the next page (per server side paging). /// It's null for now, added for future use. /// - internal BuildResultCollection(IReadOnlyList value, string nextLink) + internal AppBuildResultList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// Collection of Build result resources. - public IReadOnlyList Value { get; } + 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. diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildServiceAgentPoolResourceData.Serialization.cs similarity index 87% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceData.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildServiceAgentPoolResourceData.Serialization.cs index 0bf9975352e75..ca330ad4f4426 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceData.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildServiceAgentPoolResourceData.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.AppPlatform { - public partial class BuildServiceAgentPoolResourceData : IUtf8JsonSerializable + public partial class AppBuildServiceAgentPoolResourceData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -25,7 +25,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static BuildServiceAgentPoolResourceData DeserializeBuildServiceAgentPoolResourceData(JsonElement element) + internal static AppBuildServiceAgentPoolResourceData DeserializeAppBuildServiceAgentPoolResourceData(JsonElement element) { Optional properties = default; ResourceIdentifier id = default; @@ -65,7 +65,7 @@ internal static BuildServiceAgentPoolResourceData DeserializeBuildServiceAgentPo continue; } } - return new BuildServiceAgentPoolResourceData(id, name, type, systemData, properties.Value); + return new AppBuildServiceAgentPoolResourceData(id, name, type, systemData, properties.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildServiceData.Serialization.cs similarity index 89% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceData.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildServiceData.Serialization.cs index d2dcc50393d9a..ed0e776b36aa6 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceData.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildServiceData.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.AppPlatform { - public partial class BuildServiceData : IUtf8JsonSerializable + public partial class AppBuildServiceData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -25,7 +25,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static BuildServiceData DeserializeBuildServiceData(JsonElement element) + internal static AppBuildServiceData DeserializeAppBuildServiceData(JsonElement element) { Optional properties = default; ResourceIdentifier id = default; @@ -65,7 +65,7 @@ internal static BuildServiceData DeserializeBuildServiceData(JsonElement element continue; } } - return new BuildServiceData(id, name, type, systemData, properties.Value); + return new AppBuildServiceData(id, name, type, systemData, properties.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildServiceList.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildServiceList.Serialization.cs new file mode 100644 index 0000000000000..225a759bb0a66 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildServiceList.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class AppBuildServiceList + { + internal static AppBuildServiceList DeserializeAppBuildServiceList(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AppBuildServiceData.DeserializeAppBuildServiceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new AppBuildServiceList(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildServiceList.cs similarity index 71% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildServiceList.cs index 1527dca639379..e8b329937c1ea 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuildServiceList.cs @@ -12,28 +12,28 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Object that includes an array of Build service resources and a possible link for next set. - internal partial class BuildServiceCollection + internal partial class AppBuildServiceList { - /// Initializes a new instance of BuildServiceCollection. - internal BuildServiceCollection() + /// Initializes a new instance of AppBuildServiceList. + internal AppBuildServiceList() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } - /// Initializes a new instance of BuildServiceCollection. + /// Initializes a new instance of AppBuildServiceList. /// Collection of Build service resources. /// /// URL client should use to fetch the next page (per server side paging). /// It's null for now, added for future use. /// - internal BuildServiceCollection(IReadOnlyList value, string nextLink) + internal AppBuildServiceList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// Collection of Build service resources. - public IReadOnlyList Value { get; } + 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. diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuilderProperties.Serialization.cs similarity index 84% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderProperties.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuilderProperties.Serialization.cs index d78ab414330f3..654a2a9e1a8a5 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderProperties.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuilderProperties.Serialization.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.AppPlatform.Models { - public partial class BuilderProperties : IUtf8JsonSerializable + public partial class AppBuilderProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -34,9 +34,9 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static BuilderProperties DeserializeBuilderProperties(JsonElement element) + internal static AppBuilderProperties DeserializeAppBuilderProperties(JsonElement element) { - Optional provisioningState = default; + Optional provisioningState = default; Optional stack = default; Optional> buildpackGroups = default; foreach (var property in element.EnumerateObject()) @@ -48,7 +48,7 @@ internal static BuilderProperties DeserializeBuilderProperties(JsonElement eleme property.ThrowNonNullablePropertyIsNull(); continue; } - provisioningState = new BuilderProvisioningState(property.Value.GetString()); + provisioningState = new AppBuilderProvisioningState(property.Value.GetString()); continue; } if (property.NameEquals("stack")) @@ -77,7 +77,7 @@ internal static BuilderProperties DeserializeBuilderProperties(JsonElement eleme continue; } } - return new BuilderProperties(Optional.ToNullable(provisioningState), stack.Value, Optional.ToList(buildpackGroups)); + return new AppBuilderProperties(Optional.ToNullable(provisioningState), stack.Value, Optional.ToList(buildpackGroups)); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuilderProperties.cs similarity index 69% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderProperties.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuilderProperties.cs index 778fb1153a6f0..d6c1c19406794 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderProperties.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuilderProperties.cs @@ -11,19 +11,19 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// KPack Builder properties payload. - public partial class BuilderProperties + public partial class AppBuilderProperties { - /// Initializes a new instance of BuilderProperties. - public BuilderProperties() + /// Initializes a new instance of AppBuilderProperties. + public AppBuilderProperties() { BuildpackGroups = new ChangeTrackingList(); } - /// Initializes a new instance of BuilderProperties. + /// Initializes a new instance of AppBuilderProperties. /// Builder provision status. /// Builder cluster stack property. /// Builder buildpack groups. - internal BuilderProperties(BuilderProvisioningState? provisioningState, StackProperties stack, IList buildpackGroups) + internal AppBuilderProperties(AppBuilderProvisioningState? provisioningState, StackProperties stack, IList buildpackGroups) { ProvisioningState = provisioningState; Stack = stack; @@ -31,7 +31,7 @@ internal BuilderProperties(BuilderProvisioningState? provisioningState, StackPro } /// Builder provision status. - public BuilderProvisioningState? ProvisioningState { get; } + public AppBuilderProvisioningState? ProvisioningState { get; } /// Builder cluster stack property. public StackProperties Stack { get; set; } /// Builder buildpack groups. diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuilderProvisioningState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuilderProvisioningState.cs new file mode 100644 index 0000000000000..50fae6db6affa --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuilderProvisioningState.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 +{ + /// Builder provision status. + public readonly partial struct AppBuilderProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AppBuilderProvisioningState(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 AppBuilderProvisioningState Creating { get; } = new AppBuilderProvisioningState(CreatingValue); + /// Updating. + public static AppBuilderProvisioningState Updating { get; } = new AppBuilderProvisioningState(UpdatingValue); + /// Succeeded. + public static AppBuilderProvisioningState Succeeded { get; } = new AppBuilderProvisioningState(SucceededValue); + /// Failed. + public static AppBuilderProvisioningState Failed { get; } = new AppBuilderProvisioningState(FailedValue); + /// Deleting. + public static AppBuilderProvisioningState Deleting { get; } = new AppBuilderProvisioningState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(AppBuilderProvisioningState left, AppBuilderProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AppBuilderProvisioningState left, AppBuilderProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AppBuilderProvisioningState(string value) => new AppBuilderProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AppBuilderProvisioningState other && Equals(other); + /// + public bool Equals(AppBuilderProvisioningState 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/BuilderResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuilderResourceData.Serialization.cs similarity index 82% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderResourceData.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuilderResourceData.Serialization.cs index a99461e77d772..b51c982668cd8 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderResourceData.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuilderResourceData.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.AppPlatform { - public partial class BuilderResourceData : IUtf8JsonSerializable + public partial class AppBuilderResourceData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -25,9 +25,9 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static BuilderResourceData DeserializeBuilderResourceData(JsonElement element) + internal static AppBuilderResourceData DeserializeAppBuilderResourceData(JsonElement element) { - Optional properties = default; + Optional properties = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -41,7 +41,7 @@ internal static BuilderResourceData DeserializeBuilderResourceData(JsonElement e property.ThrowNonNullablePropertyIsNull(); continue; } - properties = BuilderProperties.DeserializeBuilderProperties(property.Value); + properties = AppBuilderProperties.DeserializeAppBuilderProperties(property.Value); continue; } if (property.NameEquals("id")) @@ -65,7 +65,7 @@ internal static BuilderResourceData DeserializeBuilderResourceData(JsonElement e continue; } } - return new BuilderResourceData(id, name, type, systemData, properties.Value); + return new AppBuilderResourceData(id, name, type, systemData, properties.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuilderResourceList.Serialization.cs similarity index 70% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceCollection.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuilderResourceList.Serialization.cs index 6344daabdb581..2b53d36e592ed 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceCollection.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuilderResourceList.Serialization.cs @@ -12,11 +12,11 @@ namespace Azure.ResourceManager.AppPlatform.Models { - internal partial class BuildServiceCollection + internal partial class AppBuilderResourceList { - internal static BuildServiceCollection DeserializeBuildServiceCollection(JsonElement element) + internal static AppBuilderResourceList DeserializeAppBuilderResourceList(JsonElement element) { - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -27,10 +27,10 @@ internal static BuildServiceCollection DeserializeBuildServiceCollection(JsonEle property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(BuildServiceData.DeserializeBuildServiceData(item)); + array.Add(AppBuilderResourceData.DeserializeAppBuilderResourceData(item)); } value = array; continue; @@ -41,7 +41,7 @@ internal static BuildServiceCollection DeserializeBuildServiceCollection(JsonEle continue; } } - return new BuildServiceCollection(Optional.ToList(value), nextLink.Value); + return new AppBuilderResourceList(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuilderResourceList.cs similarity index 70% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderResourceCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuilderResourceList.cs index b9c0cb24b2ec8..cbe16cae5a1da 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppBuilderResourceList.cs @@ -12,28 +12,28 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Object that includes an array of Builder resources and a possible link for next set. - internal partial class BuilderResourceCollection + internal partial class AppBuilderResourceList { - /// Initializes a new instance of BuilderResourceCollection. - internal BuilderResourceCollection() + /// Initializes a new instance of AppBuilderResourceList. + internal AppBuilderResourceList() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } - /// Initializes a new instance of BuilderResourceCollection. + /// Initializes a new instance of AppBuilderResourceList. /// Collection of Builder resources. /// /// URL client should use to fetch the next page (per server side paging). /// It's null for now, added for future use. /// - internal BuilderResourceCollection(IReadOnlyList value, string nextLink) + internal AppBuilderResourceList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// Collection of Builder resources. - public IReadOnlyList Value { get; } + 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. diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppDeploymentResourceData.Serialization.cs similarity index 90% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceData.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppDeploymentResourceData.Serialization.cs index 0fb145c7b6495..ac41ed64fe330 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceData.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppDeploymentResourceData.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.AppPlatform { - public partial class DeploymentResourceData : IUtf8JsonSerializable + public partial class AppDeploymentResourceData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -30,7 +30,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static DeploymentResourceData DeserializeDeploymentResourceData(JsonElement element) + internal static AppDeploymentResourceData DeserializeAppDeploymentResourceData(JsonElement element) { Optional properties = default; Optional sku = default; @@ -81,7 +81,7 @@ internal static DeploymentResourceData DeserializeDeploymentResourceData(JsonEle continue; } } - return new DeploymentResourceData(id, name, type, systemData, properties.Value, sku.Value); + return new AppDeploymentResourceData(id, name, type, systemData, properties.Value, sku.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceList.Serialization.cs similarity index 85% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceCollection.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceList.Serialization.cs index cd0a63d24286a..66c42cbfe4be8 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceCollection.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceList.Serialization.cs @@ -12,9 +12,9 @@ namespace Azure.ResourceManager.AppPlatform.Models { - internal partial class AppResourceCollection + internal partial class AppResourceList { - internal static AppResourceCollection DeserializeAppResourceCollection(JsonElement element) + internal static AppResourceList DeserializeAppResourceList(JsonElement element) { Optional> value = default; Optional nextLink = default; @@ -41,7 +41,7 @@ internal static AppResourceCollection DeserializeAppResourceCollection(JsonEleme continue; } } - return new AppResourceCollection(Optional.ToList(value), nextLink.Value); + return new AppResourceList(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceList.cs similarity index 77% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceList.cs index 8269a4b2bc615..105577ab68db9 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceList.cs @@ -12,21 +12,21 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Object that includes an array of App resources and a possible link for next set. - internal partial class AppResourceCollection + internal partial class AppResourceList { - /// Initializes a new instance of AppResourceCollection. - internal AppResourceCollection() + /// Initializes a new instance of AppResourceList. + internal AppResourceList() { Value = new ChangeTrackingList(); } - /// Initializes a new instance of AppResourceCollection. + /// Initializes a new instance of AppResourceList. /// Collection of App resources. /// /// URL client should use to fetch the next page (per server side paging). /// It's null for now, added for future use. /// - internal AppResourceCollection(IReadOnlyList value, string nextLink) + internal AppResourceList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceList.Serialization.cs similarity index 84% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceCollection.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceList.Serialization.cs index d157c8339f6e6..2700f339cd852 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceCollection.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceList.Serialization.cs @@ -12,9 +12,9 @@ namespace Azure.ResourceManager.AppPlatform.Models { - internal partial class BindingResourceCollection + internal partial class BindingResourceList { - internal static BindingResourceCollection DeserializeBindingResourceCollection(JsonElement element) + internal static BindingResourceList DeserializeBindingResourceList(JsonElement element) { Optional> value = default; Optional nextLink = default; @@ -41,7 +41,7 @@ internal static BindingResourceCollection DeserializeBindingResourceCollection(J continue; } } - return new BindingResourceCollection(Optional.ToList(value), nextLink.Value); + return new BindingResourceList(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceList.cs similarity index 84% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceList.cs index 8e47e9453a012..b40efe3a676b8 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceList.cs @@ -12,21 +12,21 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Object that includes an array of Binding resources and a possible link for next set. - internal partial class BindingResourceCollection + internal partial class BindingResourceList { - /// Initializes a new instance of BindingResourceCollection. - internal BindingResourceCollection() + /// Initializes a new instance of BindingResourceList. + internal BindingResourceList() { Value = new ChangeTrackingList(); } - /// Initializes a new instance of BindingResourceCollection. + /// Initializes a new instance of BindingResourceList. /// Collection of Binding resources. /// /// URL client should use to fetch the next page (per server side paging). /// It's null for now, added for future use. /// - internal BindingResourceCollection(IReadOnlyList value, string nextLink) + internal BindingResourceList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceProperties.Serialization.cs index e634685134edf..f1eeb028c925a 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceProperties.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceProperties.Serialization.cs @@ -48,7 +48,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) internal static BindingResourceProperties DeserializeBindingResourceProperties(JsonElement element) { Optional resourceName = default; - Optional resourceType = default; + Optional resourceType = default; Optional resourceId = default; Optional key = default; Optional> bindingParameters = default; @@ -64,7 +64,12 @@ internal static BindingResourceProperties DeserializeBindingResourceProperties(J } if (property.NameEquals("resourceType")) { - resourceType = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + resourceType = new ResourceType(property.Value.GetString()); continue; } if (property.NameEquals("resourceId")) @@ -113,7 +118,7 @@ internal static BindingResourceProperties DeserializeBindingResourceProperties(J continue; } } - return new BindingResourceProperties(resourceName.Value, resourceType.Value, resourceId.Value, key.Value, Optional.ToDictionary(bindingParameters), generatedProperties.Value, createdAt.Value, updatedAt.Value); + return new BindingResourceProperties(resourceName.Value, Optional.ToNullable(resourceType), resourceId.Value, key.Value, Optional.ToDictionary(bindingParameters), generatedProperties.Value, createdAt.Value, updatedAt.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceProperties.cs index a3db18ae388ab..23921b6bea3b5 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceProperties.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingResourceProperties.cs @@ -29,7 +29,7 @@ public BindingResourceProperties() /// 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 BindingResourceProperties(string resourceName, string resourceType, ResourceIdentifier resourceId, string key, IDictionary bindingParameters, string generatedProperties, string createdAt, string updatedAt) + internal BindingResourceProperties(string resourceName, ResourceType? resourceType, ResourceIdentifier resourceId, string key, IDictionary bindingParameters, string generatedProperties, string createdAt, string updatedAt) { ResourceName = resourceName; ResourceType = resourceType; @@ -44,7 +44,7 @@ internal BindingResourceProperties(string resourceName, string resourceType, Res /// The name of the bound resource. public string ResourceName { get; } /// The standard Azure resource type of the bound resource. - public string ResourceType { get; } + public ResourceType? ResourceType { get; } /// The Azure resource id of the bound resource. public ResourceIdentifier ResourceId { get; set; } /// The key of the bound resource. diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildProvisioningState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildProvisioningState.cs deleted file mode 100644 index a4eeb537185c3..0000000000000 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildProvisioningState.cs +++ /dev/null @@ -1,60 +0,0 @@ -// 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 KPack build result. - public readonly partial struct BuildProvisioningState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public BuildProvisioningState(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 BuildProvisioningState Creating { get; } = new BuildProvisioningState(CreatingValue); - /// Updating. - public static BuildProvisioningState Updating { get; } = new BuildProvisioningState(UpdatingValue); - /// Succeeded. - public static BuildProvisioningState Succeeded { get; } = new BuildProvisioningState(SucceededValue); - /// Failed. - public static BuildProvisioningState Failed { get; } = new BuildProvisioningState(FailedValue); - /// Deleting. - public static BuildProvisioningState Deleting { get; } = new BuildProvisioningState(DeletingValue); - /// Determines if two values are the same. - public static bool operator ==(BuildProvisioningState left, BuildProvisioningState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(BuildProvisioningState left, BuildProvisioningState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator BuildProvisioningState(string value) => new BuildProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is BuildProvisioningState other && Equals(other); - /// - public bool Equals(BuildProvisioningState 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/BuildServiceAgentPoolResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceCollection.Serialization.cs deleted file mode 100644 index 162ed67e06df9..0000000000000 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceCollection.Serialization.cs +++ /dev/null @@ -1,47 +0,0 @@ -// 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 BuildServiceAgentPoolResourceCollection - { - internal static BuildServiceAgentPoolResourceCollection DeserializeBuildServiceAgentPoolResourceCollection(JsonElement element) - { - Optional> value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(BuildServiceAgentPoolResourceData.DeserializeBuildServiceAgentPoolResourceData(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink")) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new BuildServiceAgentPoolResourceCollection(Optional.ToList(value), nextLink.Value); - } - } -} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceList.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceList.Serialization.cs new file mode 100644 index 0000000000000..dbdeca64d735d --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceList.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class BuildServiceAgentPoolResourceList + { + internal static BuildServiceAgentPoolResourceList DeserializeBuildServiceAgentPoolResourceList(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AppBuildServiceAgentPoolResourceData.DeserializeAppBuildServiceAgentPoolResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new BuildServiceAgentPoolResourceList(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceList.cs similarity index 71% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceList.cs index 9fc13f38b3280..61af7181678d1 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildServiceAgentPoolResourceList.cs @@ -12,28 +12,28 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Object that includes an array of build service agent pool resources and a possible link for next set. - internal partial class BuildServiceAgentPoolResourceCollection + internal partial class BuildServiceAgentPoolResourceList { - /// Initializes a new instance of BuildServiceAgentPoolResourceCollection. - internal BuildServiceAgentPoolResourceCollection() + /// Initializes a new instance of BuildServiceAgentPoolResourceList. + internal BuildServiceAgentPoolResourceList() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } - /// Initializes a new instance of BuildServiceAgentPoolResourceCollection. + /// Initializes a new instance of BuildServiceAgentPoolResourceList. /// Collection of build service agent pool resource. /// /// URL client should use to fetch the next page (per server side paging). /// It's null for now, added for future use. /// - internal BuildServiceAgentPoolResourceCollection(IReadOnlyList value, string nextLink) + internal BuildServiceAgentPoolResourceList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// Collection of build service agent pool resource. - public IReadOnlyList Value { get; } + 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. diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderProvisioningState.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderProvisioningState.cs deleted file mode 100644 index fe13493c64f61..0000000000000 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderProvisioningState.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.AppPlatform.Models -{ - /// Builder provision status. - public readonly partial struct BuilderProvisioningState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public BuilderProvisioningState(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 BuilderProvisioningState Creating { get; } = new BuilderProvisioningState(CreatingValue); - /// Updating. - public static BuilderProvisioningState Updating { get; } = new BuilderProvisioningState(UpdatingValue); - /// Succeeded. - public static BuilderProvisioningState Succeeded { get; } = new BuilderProvisioningState(SucceededValue); - /// Failed. - public static BuilderProvisioningState Failed { get; } = new BuilderProvisioningState(FailedValue); - /// Deleting. - public static BuilderProvisioningState Deleting { get; } = new BuilderProvisioningState(DeletingValue); - /// Determines if two values are the same. - public static bool operator ==(BuilderProvisioningState left, BuilderProvisioningState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(BuilderProvisioningState left, BuilderProvisioningState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator BuilderProvisioningState(string value) => new BuilderProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is BuilderProvisioningState other && Equals(other); - /// - public bool Equals(BuilderProvisioningState 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/BuilderResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderResourceCollection.Serialization.cs deleted file mode 100644 index f8487617adedb..0000000000000 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuilderResourceCollection.Serialization.cs +++ /dev/null @@ -1,47 +0,0 @@ -// 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 BuilderResourceCollection - { - internal static BuilderResourceCollection DeserializeBuilderResourceCollection(JsonElement element) - { - Optional> value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(BuilderResourceData.DeserializeBuilderResourceData(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink")) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new BuilderResourceCollection(Optional.ToList(value), nextLink.Value); - } - } -} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingResourceList.Serialization.cs similarity index 83% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingResourceCollection.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingResourceList.Serialization.cs index a79ad22bf8387..799e9f2f93fe9 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingResourceCollection.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingResourceList.Serialization.cs @@ -12,9 +12,9 @@ namespace Azure.ResourceManager.AppPlatform.Models { - internal partial class BuildpackBindingResourceCollection + internal partial class BuildpackBindingResourceList { - internal static BuildpackBindingResourceCollection DeserializeBuildpackBindingResourceCollection(JsonElement element) + internal static BuildpackBindingResourceList DeserializeBuildpackBindingResourceList(JsonElement element) { Optional> value = default; Optional nextLink = default; @@ -41,7 +41,7 @@ internal static BuildpackBindingResourceCollection DeserializeBuildpackBindingRe continue; } } - return new BuildpackBindingResourceCollection(Optional.ToList(value), nextLink.Value); + return new BuildpackBindingResourceList(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingResourceList.cs similarity index 81% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingResourceCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingResourceList.cs index 3ff707e3305f6..80bff2e796eef 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BuildpackBindingResourceList.cs @@ -12,21 +12,21 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Object that includes an array of BuildpackBinding resources and a possible link for next set. - internal partial class BuildpackBindingResourceCollection + internal partial class BuildpackBindingResourceList { - /// Initializes a new instance of BuildpackBindingResourceCollection. - internal BuildpackBindingResourceCollection() + /// Initializes a new instance of BuildpackBindingResourceList. + internal BuildpackBindingResourceList() { Value = new ChangeTrackingList(); } - /// Initializes a new instance of BuildpackBindingResourceCollection. + /// Initializes a new instance of BuildpackBindingResourceList. /// Collection of BuildpackBinding resources. /// /// URL client should use to fetch the next page (per server side paging). /// It's null for now, added for future use. /// - internal BuildpackBindingResourceCollection(IReadOnlyList value, string nextLink) + internal BuildpackBindingResourceList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateResourceList.Serialization.cs similarity index 84% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateResourceCollection.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateResourceList.Serialization.cs index 33bfed3c711ba..5decbd1f6fe03 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateResourceCollection.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateResourceList.Serialization.cs @@ -12,9 +12,9 @@ namespace Azure.ResourceManager.AppPlatform.Models { - internal partial class CertificateResourceCollection + internal partial class CertificateResourceList { - internal static CertificateResourceCollection DeserializeCertificateResourceCollection(JsonElement element) + internal static CertificateResourceList DeserializeCertificateResourceList(JsonElement element) { Optional> value = default; Optional nextLink = default; @@ -41,7 +41,7 @@ internal static CertificateResourceCollection DeserializeCertificateResourceColl continue; } } - return new CertificateResourceCollection(Optional.ToList(value), nextLink.Value); + return new CertificateResourceList(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateResourceList.cs similarity index 80% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateResourceCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateResourceList.cs index 77770856399f8..cbd3c6f576882 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CertificateResourceList.cs @@ -12,18 +12,18 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Collection compose of certificate resources list and a possible link for next page. - internal partial class CertificateResourceCollection + internal partial class CertificateResourceList { - /// Initializes a new instance of CertificateResourceCollection. - internal CertificateResourceCollection() + /// Initializes a new instance of CertificateResourceList. + internal CertificateResourceList() { Value = new ChangeTrackingList(); } - /// Initializes a new instance of CertificateResourceCollection. + /// Initializes a new instance of CertificateResourceList. /// The certificate resources list. /// The link to next page of certificate list. - internal CertificateResourceCollection(IReadOnlyList value, string nextLink) + internal CertificateResourceList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceList.Serialization.cs similarity index 82% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceCollection.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceList.Serialization.cs index dc7c950288351..30ea71711154c 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceCollection.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceList.Serialization.cs @@ -12,9 +12,9 @@ namespace Azure.ResourceManager.AppPlatform.Models { - internal partial class ConfigurationServiceResourceCollection + internal partial class ConfigurationServiceResourceList { - internal static ConfigurationServiceResourceCollection DeserializeConfigurationServiceResourceCollection(JsonElement element) + internal static ConfigurationServiceResourceList DeserializeConfigurationServiceResourceList(JsonElement element) { Optional> value = default; Optional nextLink = default; @@ -41,7 +41,7 @@ internal static ConfigurationServiceResourceCollection DeserializeConfigurationS continue; } } - return new ConfigurationServiceResourceCollection(Optional.ToList(value), nextLink.Value); + return new ConfigurationServiceResourceList(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceList.cs similarity index 81% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceList.cs index 86c13bfffec0c..23bc988cce14d 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigurationServiceResourceList.cs @@ -12,21 +12,21 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Object that includes an array of configuration service resources and a possible link for next set. - internal partial class ConfigurationServiceResourceCollection + internal partial class ConfigurationServiceResourceList { - /// Initializes a new instance of ConfigurationServiceResourceCollection. - internal ConfigurationServiceResourceCollection() + /// Initializes a new instance of ConfigurationServiceResourceList. + internal ConfigurationServiceResourceList() { Value = new ChangeTrackingList(); } - /// Initializes a new instance of ConfigurationServiceResourceCollection. + /// Initializes a new instance of ConfigurationServiceResourceList. /// Collection of configuration service resources. /// /// URL client should use to fetch the next page (per server side paging). /// It's null for now, added for future use. /// - internal ConfigurationServiceResourceCollection(IReadOnlyList value, string nextLink) + internal ConfigurationServiceResourceList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceList.Serialization.cs similarity index 84% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceCollection.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceList.Serialization.cs index 9ad379e6bb902..f38958c9c6316 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceCollection.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceList.Serialization.cs @@ -12,9 +12,9 @@ namespace Azure.ResourceManager.AppPlatform.Models { - internal partial class CustomDomainResourceCollection + internal partial class CustomDomainResourceList { - internal static CustomDomainResourceCollection DeserializeCustomDomainResourceCollection(JsonElement element) + internal static CustomDomainResourceList DeserializeCustomDomainResourceList(JsonElement element) { Optional> value = default; Optional nextLink = default; @@ -41,7 +41,7 @@ internal static CustomDomainResourceCollection DeserializeCustomDomainResourceCo continue; } } - return new CustomDomainResourceCollection(Optional.ToList(value), nextLink.Value); + return new CustomDomainResourceList(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceList.cs similarity index 80% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceList.cs index 39e803c64e494..2d08cc23f3c24 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceList.cs @@ -12,18 +12,18 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Collection compose of a custom domain resources list and a possible link for next page. - internal partial class CustomDomainResourceCollection + internal partial class CustomDomainResourceList { - /// Initializes a new instance of CustomDomainResourceCollection. - internal CustomDomainResourceCollection() + /// Initializes a new instance of CustomDomainResourceList. + internal CustomDomainResourceList() { Value = new ChangeTrackingList(); } - /// Initializes a new instance of CustomDomainResourceCollection. + /// Initializes a new instance of CustomDomainResourceList. /// The custom domain resources list. /// The link to next page of custom domain list. - internal CustomDomainResourceCollection(IReadOnlyList value, string nextLink) + internal CustomDomainResourceList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceCollection.Serialization.cs deleted file mode 100644 index e99ec3973a35d..0000000000000 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceCollection.Serialization.cs +++ /dev/null @@ -1,47 +0,0 @@ -// 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 DeploymentResourceCollection - { - internal static DeploymentResourceCollection DeserializeDeploymentResourceCollection(JsonElement element) - { - Optional> value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DeploymentResourceData.DeserializeDeploymentResourceData(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink")) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new DeploymentResourceCollection(Optional.ToList(value), nextLink.Value); - } - } -} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceList.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceList.Serialization.cs new file mode 100644 index 0000000000000..61d217fb942ec --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceList.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppPlatform; + +namespace Azure.ResourceManager.AppPlatform.Models +{ + internal partial class DeploymentResourceList + { + internal static DeploymentResourceList DeserializeDeploymentResourceList(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AppDeploymentResourceData.DeserializeAppDeploymentResourceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new DeploymentResourceList(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceList.cs similarity index 74% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceList.cs index f16aa7597c4b3..b04e545442b38 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DeploymentResourceList.cs @@ -12,28 +12,28 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Object that includes an array of App resources and a possible link for next set. - internal partial class DeploymentResourceCollection + internal partial class DeploymentResourceList { - /// Initializes a new instance of DeploymentResourceCollection. - internal DeploymentResourceCollection() + /// Initializes a new instance of DeploymentResourceList. + internal DeploymentResourceList() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } - /// Initializes a new instance of DeploymentResourceCollection. + /// Initializes a new instance of DeploymentResourceList. /// Collection of Deployment resources. /// /// URL client should use to fetch the next page (per server side paging). /// It's null for now, added for future use. /// - internal DeploymentResourceCollection(IReadOnlyList value, string nextLink) + internal DeploymentResourceList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// Collection of Deployment resources. - public IReadOnlyList Value { get; } + 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. diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainResourceList.Serialization.cs similarity index 83% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainResourceCollection.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainResourceList.Serialization.cs index 49df9828a68a7..7b434ebcedfdf 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainResourceCollection.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainResourceList.Serialization.cs @@ -12,9 +12,9 @@ namespace Azure.ResourceManager.AppPlatform.Models { - internal partial class GatewayCustomDomainResourceCollection + internal partial class GatewayCustomDomainResourceList { - internal static GatewayCustomDomainResourceCollection DeserializeGatewayCustomDomainResourceCollection(JsonElement element) + internal static GatewayCustomDomainResourceList DeserializeGatewayCustomDomainResourceList(JsonElement element) { Optional> value = default; Optional nextLink = default; @@ -41,7 +41,7 @@ internal static GatewayCustomDomainResourceCollection DeserializeGatewayCustomDo continue; } } - return new GatewayCustomDomainResourceCollection(Optional.ToList(value), nextLink.Value); + return new GatewayCustomDomainResourceList(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainResourceList.cs similarity index 81% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainResourceCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainResourceList.cs index 6a6608c5655b3..70dcccd951f6d 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayCustomDomainResourceList.cs @@ -12,21 +12,21 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Object that includes an array of Spring Cloud Gateway custom domain resources and a possible link for next set. - internal partial class GatewayCustomDomainResourceCollection + internal partial class GatewayCustomDomainResourceList { - /// Initializes a new instance of GatewayCustomDomainResourceCollection. - internal GatewayCustomDomainResourceCollection() + /// Initializes a new instance of GatewayCustomDomainResourceList. + internal GatewayCustomDomainResourceList() { Value = new ChangeTrackingList(); } - /// Initializes a new instance of GatewayCustomDomainResourceCollection. + /// Initializes a new instance of GatewayCustomDomainResourceList. /// Collection of Spring Cloud Gateway custom domain resources. /// /// URL client should use to fetch the next page (per server side paging). /// It's null for now, added for future use. /// - internal GatewayCustomDomainResourceCollection(IReadOnlyList value, string nextLink) + internal GatewayCustomDomainResourceList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceList.Serialization.cs similarity index 84% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceCollection.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceList.Serialization.cs index 039e4b97cfd67..84c815aff3d5d 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceCollection.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceList.Serialization.cs @@ -12,9 +12,9 @@ namespace Azure.ResourceManager.AppPlatform.Models { - internal partial class GatewayResourceCollection + internal partial class GatewayResourceList { - internal static GatewayResourceCollection DeserializeGatewayResourceCollection(JsonElement element) + internal static GatewayResourceList DeserializeGatewayResourceList(JsonElement element) { Optional> value = default; Optional nextLink = default; @@ -41,7 +41,7 @@ internal static GatewayResourceCollection DeserializeGatewayResourceCollection(J continue; } } - return new GatewayResourceCollection(Optional.ToList(value), nextLink.Value); + return new GatewayResourceList(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceList.cs similarity index 84% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceList.cs index 32e9bb9e114b3..6af654d190e81 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayResourceList.cs @@ -12,21 +12,21 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Object that includes an array of gateway resources and a possible link for next set. - internal partial class GatewayResourceCollection + internal partial class GatewayResourceList { - /// Initializes a new instance of GatewayResourceCollection. - internal GatewayResourceCollection() + /// Initializes a new instance of GatewayResourceList. + internal GatewayResourceList() { Value = new ChangeTrackingList(); } - /// Initializes a new instance of GatewayResourceCollection. + /// Initializes a new instance of GatewayResourceList. /// Collection of gateway resources. /// /// URL client should use to fetch the next page (per server side paging). /// It's null for now, added for future use. /// - internal GatewayResourceCollection(IReadOnlyList value, string nextLink) + internal GatewayResourceList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigResourceList.Serialization.cs similarity index 83% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigResourceCollection.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigResourceList.Serialization.cs index e99486fd5e961..984d5f88ebe94 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigResourceCollection.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigResourceList.Serialization.cs @@ -12,9 +12,9 @@ namespace Azure.ResourceManager.AppPlatform.Models { - internal partial class GatewayRouteConfigResourceCollection + internal partial class GatewayRouteConfigResourceList { - internal static GatewayRouteConfigResourceCollection DeserializeGatewayRouteConfigResourceCollection(JsonElement element) + internal static GatewayRouteConfigResourceList DeserializeGatewayRouteConfigResourceList(JsonElement element) { Optional> value = default; Optional nextLink = default; @@ -41,7 +41,7 @@ internal static GatewayRouteConfigResourceCollection DeserializeGatewayRouteConf continue; } } - return new GatewayRouteConfigResourceCollection(Optional.ToList(value), nextLink.Value); + return new GatewayRouteConfigResourceList(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigResourceList.cs similarity index 81% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigResourceCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigResourceList.cs index 6c6d09fe1d169..3e8d1a9c10f68 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/GatewayRouteConfigResourceList.cs @@ -12,21 +12,21 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Object that includes an array of Spring Cloud Gateway route config resources and a possible link for next set. - internal partial class GatewayRouteConfigResourceCollection + internal partial class GatewayRouteConfigResourceList { - /// Initializes a new instance of GatewayRouteConfigResourceCollection. - internal GatewayRouteConfigResourceCollection() + /// Initializes a new instance of GatewayRouteConfigResourceList. + internal GatewayRouteConfigResourceList() { Value = new ChangeTrackingList(); } - /// Initializes a new instance of GatewayRouteConfigResourceCollection. + /// Initializes a new instance of GatewayRouteConfigResourceList. /// Collection of Spring Cloud Gateway route config resources. /// /// URL client should use to fetch the next page (per server side paging). /// It's null for now, added for future use. /// - internal GatewayRouteConfigResourceCollection(IReadOnlyList value, string nextLink) + internal GatewayRouteConfigResourceList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSku.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSku.Serialization.cs index 7585f45c8efc7..0bd0222928dc0 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSku.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSku.Serialization.cs @@ -15,18 +15,23 @@ public partial class ResourceSku { internal static ResourceSku DeserializeResourceSku(JsonElement element) { - Optional resourceType = default; + Optional resourceType = default; Optional name = default; Optional tier = default; Optional capacity = default; - Optional> locations = default; + Optional> locations = default; Optional> locationInfo = default; Optional> restrictions = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("resourceType")) { - resourceType = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + resourceType = new ResourceType(property.Value.GetString()); continue; } if (property.NameEquals("name")) @@ -56,10 +61,10 @@ internal static ResourceSku DeserializeResourceSku(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(item.GetString()); + array.Add(new AzureLocation(item.GetString())); } locations = array; continue; @@ -95,7 +100,7 @@ internal static ResourceSku DeserializeResourceSku(JsonElement element) continue; } } - return new ResourceSku(resourceType.Value, name.Value, tier.Value, capacity.Value, Optional.ToList(locations), Optional.ToList(locationInfo), Optional.ToList(restrictions)); + return new ResourceSku(Optional.ToNullable(resourceType), name.Value, tier.Value, capacity.Value, Optional.ToList(locations), Optional.ToList(locationInfo), Optional.ToList(restrictions)); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSku.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSku.cs index 5dba3bd9dd68a..e184e5153c27f 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSku.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSku.cs @@ -16,7 +16,7 @@ public partial class ResourceSku /// Initializes a new instance of ResourceSku. internal ResourceSku() { - Locations = new ChangeTrackingList(); + Locations = new ChangeTrackingList(); LocationInfo = new ChangeTrackingList(); Restrictions = new ChangeTrackingList(); } @@ -32,7 +32,7 @@ internal ResourceSku() /// Gets the restrictions because of which SKU cannot be used. This is /// empty if there are no restrictions. /// - internal ResourceSku(string resourceType, string name, string tier, SkuCapacity capacity, IReadOnlyList locations, IReadOnlyList locationInfo, IReadOnlyList restrictions) + internal ResourceSku(ResourceType? resourceType, string name, string tier, SkuCapacity capacity, IReadOnlyList locations, IReadOnlyList locationInfo, IReadOnlyList restrictions) { ResourceType = resourceType; Name = name; @@ -44,7 +44,7 @@ internal ResourceSku(string resourceType, string name, string tier, SkuCapacity } /// Gets the type of resource the SKU applies to. - public string ResourceType { get; } + public ResourceType? ResourceType { get; } /// Gets the name of SKU. public string Name { get; } /// Gets the tier of SKU. @@ -52,7 +52,7 @@ internal ResourceSku(string resourceType, string name, string tier, SkuCapacity /// Gets the capacity of SKU. public SkuCapacity Capacity { get; } /// Gets the set of locations that the SKU is available. - public IReadOnlyList Locations { get; } + public IReadOnlyList Locations { get; } /// Gets a list of locations and availability zones in those locations where the SKU is available. public IReadOnlyList LocationInfo { get; } /// diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuList.Serialization.cs similarity index 84% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuCollection.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuList.Serialization.cs index f6cb550801fa6..9f5a0d0035dd1 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuCollection.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuList.Serialization.cs @@ -11,9 +11,9 @@ namespace Azure.ResourceManager.AppPlatform.Models { - internal partial class ResourceSkuCollection + internal partial class ResourceSkuList { - internal static ResourceSkuCollection DeserializeResourceSkuCollection(JsonElement element) + internal static ResourceSkuList DeserializeResourceSkuList(JsonElement element) { Optional> value = default; Optional nextLink = default; @@ -40,7 +40,7 @@ internal static ResourceSkuCollection DeserializeResourceSkuCollection(JsonEleme continue; } } - return new ResourceSkuCollection(Optional.ToList(value), nextLink.Value); + return new ResourceSkuList(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuList.cs similarity index 76% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuList.cs index 5c847901b8671..380bfe8d8c348 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuList.cs @@ -11,21 +11,21 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Object that includes an array of Azure Spring Cloud SKU and a possible link for next set. - internal partial class ResourceSkuCollection + internal partial class ResourceSkuList { - /// Initializes a new instance of ResourceSkuCollection. - internal ResourceSkuCollection() + /// Initializes a new instance of ResourceSkuList. + internal ResourceSkuList() { Value = new ChangeTrackingList(); } - /// Initializes a new instance of ResourceSkuCollection. + /// Initializes a new instance of ResourceSkuList. /// Collection of resource SKU. /// /// URL client should use to fetch the next page (per server side paging). /// It's null for now, added for future use. /// - internal ResourceSkuCollection(IReadOnlyList value, string nextLink) + internal ResourceSkuList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceList.Serialization.cs similarity index 83% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceCollection.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceList.Serialization.cs index 417761fff5fc6..dc209366f7477 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceCollection.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceList.Serialization.cs @@ -12,9 +12,9 @@ namespace Azure.ResourceManager.AppPlatform.Models { - internal partial class ServiceRegistryResourceCollection + internal partial class ServiceRegistryResourceList { - internal static ServiceRegistryResourceCollection DeserializeServiceRegistryResourceCollection(JsonElement element) + internal static ServiceRegistryResourceList DeserializeServiceRegistryResourceList(JsonElement element) { Optional> value = default; Optional nextLink = default; @@ -41,7 +41,7 @@ internal static ServiceRegistryResourceCollection DeserializeServiceRegistryReso continue; } } - return new ServiceRegistryResourceCollection(Optional.ToList(value), nextLink.Value); + return new ServiceRegistryResourceList(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceList.cs similarity index 82% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceList.cs index 8b90728e0c3d8..6b7562812c3ac 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceRegistryResourceList.cs @@ -12,21 +12,21 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Object that includes an array of Service Registry resources and a possible link for next set. - internal partial class ServiceRegistryResourceCollection + internal partial class ServiceRegistryResourceList { - /// Initializes a new instance of ServiceRegistryResourceCollection. - internal ServiceRegistryResourceCollection() + /// Initializes a new instance of ServiceRegistryResourceList. + internal ServiceRegistryResourceList() { Value = new ChangeTrackingList(); } - /// Initializes a new instance of ServiceRegistryResourceCollection. + /// Initializes a new instance of ServiceRegistryResourceList. /// Collection of Service Registry resources. /// /// URL client should use to fetch the next page (per server side paging). /// It's null for now, added for future use. /// - internal ServiceRegistryResourceCollection(IReadOnlyList value, string nextLink) + internal ServiceRegistryResourceList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageResourceCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageResourceList.Serialization.cs similarity index 84% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageResourceCollection.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageResourceList.Serialization.cs index 2919c6c4896a1..f711cafe177bd 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageResourceCollection.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageResourceList.Serialization.cs @@ -12,9 +12,9 @@ namespace Azure.ResourceManager.AppPlatform.Models { - internal partial class StorageResourceCollection + internal partial class StorageResourceList { - internal static StorageResourceCollection DeserializeStorageResourceCollection(JsonElement element) + internal static StorageResourceList DeserializeStorageResourceList(JsonElement element) { Optional> value = default; Optional nextLink = default; @@ -41,7 +41,7 @@ internal static StorageResourceCollection DeserializeStorageResourceCollection(J continue; } } - return new StorageResourceCollection(Optional.ToList(value), nextLink.Value); + return new StorageResourceList(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageResourceList.cs similarity index 81% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageResourceCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageResourceList.cs index 1cee11206ce09..73d2b414fb1e6 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/StorageResourceList.cs @@ -12,18 +12,18 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Collection compose of storage resources list and a possible link for next page. - internal partial class StorageResourceCollection + internal partial class StorageResourceList { - /// Initializes a new instance of StorageResourceCollection. - internal StorageResourceCollection() + /// Initializes a new instance of StorageResourceList. + internal StorageResourceList() { Value = new ChangeTrackingList(); } - /// Initializes a new instance of StorageResourceCollection. + /// Initializes a new instance of StorageResourceList. /// The storage resources list. /// The link to next page of storage list. - internal StorageResourceCollection(IReadOnlyList value, string nextLink) + internal StorageResourceList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpacksCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpacksList.Serialization.cs similarity index 84% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpacksCollection.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpacksList.Serialization.cs index 1395e364dfd99..e3ddffa286b01 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpacksCollection.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpacksList.Serialization.cs @@ -12,9 +12,9 @@ namespace Azure.ResourceManager.AppPlatform.Models { - internal partial class SupportedBuildpacksCollection + internal partial class SupportedBuildpacksList { - internal static SupportedBuildpacksCollection DeserializeSupportedBuildpacksCollection(JsonElement element) + internal static SupportedBuildpacksList DeserializeSupportedBuildpacksList(JsonElement element) { Optional> value = default; Optional nextLink = default; @@ -41,7 +41,7 @@ internal static SupportedBuildpacksCollection DeserializeSupportedBuildpacksColl continue; } } - return new SupportedBuildpacksCollection(Optional.ToList(value), nextLink.Value); + return new SupportedBuildpacksList(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpacksCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpacksList.cs similarity index 83% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpacksCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpacksList.cs index 0552eef3763c0..5544bf510f499 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpacksCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedBuildpacksList.cs @@ -12,21 +12,21 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Object that includes an array of supported buildpacks resources and a possible link for next set. - internal partial class SupportedBuildpacksCollection + internal partial class SupportedBuildpacksList { - /// Initializes a new instance of SupportedBuildpacksCollection. - internal SupportedBuildpacksCollection() + /// Initializes a new instance of SupportedBuildpacksList. + internal SupportedBuildpacksList() { Value = new ChangeTrackingList(); } - /// Initializes a new instance of SupportedBuildpacksCollection. + /// Initializes a new instance of SupportedBuildpacksList. /// Collection of supported buildpacks resources. /// /// URL client should use to fetch the next page (per server side paging). /// It's null for now, added for future use. /// - internal SupportedBuildpacksCollection(IReadOnlyList value, string nextLink) + internal SupportedBuildpacksList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStacksCollection.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStacksList.Serialization.cs similarity index 85% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStacksCollection.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStacksList.Serialization.cs index a652b20da765a..f1fd3fe94b73f 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStacksCollection.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStacksList.Serialization.cs @@ -12,9 +12,9 @@ namespace Azure.ResourceManager.AppPlatform.Models { - internal partial class SupportedStacksCollection + internal partial class SupportedStacksList { - internal static SupportedStacksCollection DeserializeSupportedStacksCollection(JsonElement element) + internal static SupportedStacksList DeserializeSupportedStacksList(JsonElement element) { Optional> value = default; Optional nextLink = default; @@ -41,7 +41,7 @@ internal static SupportedStacksCollection DeserializeSupportedStacksCollection(J continue; } } - return new SupportedStacksCollection(Optional.ToList(value), nextLink.Value); + return new SupportedStacksList(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStacksCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStacksList.cs similarity index 84% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStacksCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStacksList.cs index e8a1267abe8e6..10dea5733c93b 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStacksCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedStacksList.cs @@ -12,21 +12,21 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Object that includes an array of supported stacks resources and a possible link for next set. - internal partial class SupportedStacksCollection + internal partial class SupportedStacksList { - /// Initializes a new instance of SupportedStacksCollection. - internal SupportedStacksCollection() + /// Initializes a new instance of SupportedStacksList. + internal SupportedStacksList() { Value = new ChangeTrackingList(); } - /// Initializes a new instance of SupportedStacksCollection. + /// Initializes a new instance of SupportedStacksList. /// Collection of supported stacks resources. /// /// URL client should use to fetch the next page (per server side paging). /// It's null for now, added for future use. /// - internal SupportedStacksCollection(IReadOnlyList value, string nextLink) + internal SupportedStacksList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; 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 d642fbc2837c4..98ba4255b34ea 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApiPortalCustomDomainsRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApiPortalCustomDomainsRestOperations.cs @@ -336,7 +336,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 apiPortalName, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiPortalName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -349,9 +349,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.ApiPortalCustomDomainResourceCollection value = default; + ApiPortalCustomDomainResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.ApiPortalCustomDomainResourceCollection.DeserializeApiPortalCustomDomainResourceCollection(document.RootElement); + value = ApiPortalCustomDomainResourceList.DeserializeApiPortalCustomDomainResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -367,7 +367,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 apiPortalName, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string serviceName, string apiPortalName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -380,9 +380,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.ApiPortalCustomDomainResourceCollection value = default; + ApiPortalCustomDomainResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.ApiPortalCustomDomainResourceCollection.DeserializeApiPortalCustomDomainResourceCollection(document.RootElement); + value = ApiPortalCustomDomainResourceList.DeserializeApiPortalCustomDomainResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -413,7 +413,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 apiPortalName, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string apiPortalName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -427,9 +427,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.ApiPortalCustomDomainResourceCollection value = default; + ApiPortalCustomDomainResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.ApiPortalCustomDomainResourceCollection.DeserializeApiPortalCustomDomainResourceCollection(document.RootElement); + value = ApiPortalCustomDomainResourceList.DeserializeApiPortalCustomDomainResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -446,7 +446,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 apiPortalName, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string apiPortalName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -460,9 +460,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.ApiPortalCustomDomainResourceCollection value = default; + ApiPortalCustomDomainResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.ApiPortalCustomDomainResourceCollection.DeserializeApiPortalCustomDomainResourceCollection(document.RootElement); + value = ApiPortalCustomDomainResourceList.DeserializeApiPortalCustomDomainResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: 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 2c2d0c8b1428f..136b9a9fdd79f 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApiPortalsRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ApiPortalsRestOperations.cs @@ -315,7 +315,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -327,9 +327,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.ApiPortalResourceCollection value = default; + ApiPortalResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.ApiPortalResourceCollection.DeserializeApiPortalResourceCollection(document.RootElement); + value = ApiPortalResourceList.DeserializeApiPortalResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -344,7 +344,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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) + public Response List(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -356,9 +356,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.ApiPortalResourceCollection value = default; + ApiPortalResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.ApiPortalResourceCollection.DeserializeApiPortalResourceCollection(document.RootElement); + value = ApiPortalResourceList.DeserializeApiPortalResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -481,7 +481,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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) + 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)); @@ -494,9 +494,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.ApiPortalResourceCollection value = default; + ApiPortalResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.ApiPortalResourceCollection.DeserializeApiPortalResourceCollection(document.RootElement); + value = ApiPortalResourceList.DeserializeApiPortalResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -512,7 +512,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -525,9 +525,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.ApiPortalResourceCollection value = default; + ApiPortalResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.ApiPortalResourceCollection.DeserializeApiPortalResourceCollection(document.RootElement); + value = ApiPortalResourceList.DeserializeApiPortalResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: 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 7ac36d9cd8bdc..97791430cdc4b 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/AppsRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/AppsRestOperations.cs @@ -407,7 +407,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -419,9 +419,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.AppResourceCollection value = default; + AppResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.AppResourceCollection.DeserializeAppResourceCollection(document.RootElement); + value = AppResourceList.DeserializeAppResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -436,7 +436,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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) + public Response List(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -448,9 +448,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.AppResourceCollection value = default; + AppResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.AppResourceCollection.DeserializeAppResourceCollection(document.RootElement); + value = AppResourceList.DeserializeAppResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -543,7 +543,7 @@ public Response GetResourceUploadUrl(string subscripti } } - internal HttpMessage CreateSetActiveDeploymentsRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, ActiveDeploymentCollection activeDeploymentCollection) + internal HttpMessage CreateSetActiveDeploymentsRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, ActiveDeploymentList activeDeploymentCollection) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -579,7 +579,7 @@ internal HttpMessage CreateSetActiveDeploymentsRequest(string subscriptionId, st /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task SetActiveDeploymentsAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, ActiveDeploymentCollection activeDeploymentCollection, CancellationToken cancellationToken = default) + public async Task SetActiveDeploymentsAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, ActiveDeploymentList activeDeploymentCollection, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -608,7 +608,7 @@ public async Task SetActiveDeploymentsAsync(string subscriptionId, str /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response SetActiveDeployments(string subscriptionId, string resourceGroupName, string serviceName, string appName, ActiveDeploymentCollection activeDeploymentCollection, CancellationToken cancellationToken = default) + public Response SetActiveDeployments(string subscriptionId, string resourceGroupName, string serviceName, string appName, ActiveDeploymentList activeDeploymentCollection, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -743,7 +743,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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) + 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)); @@ -756,9 +756,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.AppResourceCollection value = default; + AppResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.AppResourceCollection.DeserializeAppResourceCollection(document.RootElement); + value = AppResourceList.DeserializeAppResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -774,7 +774,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -787,9 +787,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.AppResourceCollection value = default; + AppResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.AppResourceCollection.DeserializeAppResourceCollection(document.RootElement); + value = AppResourceList.DeserializeAppResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: 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 d0545b73f719b..6608bdae009df 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BindingsRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BindingsRestOperations.cs @@ -428,7 +428,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 appName, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -441,9 +441,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.BindingResourceCollection value = default; + BindingResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.BindingResourceCollection.DeserializeBindingResourceCollection(document.RootElement); + value = BindingResourceList.DeserializeBindingResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -459,7 +459,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 appName, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string serviceName, string appName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -472,9 +472,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.BindingResourceCollection value = default; + BindingResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.BindingResourceCollection.DeserializeBindingResourceCollection(document.RootElement); + value = BindingResourceList.DeserializeBindingResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -505,7 +505,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 appName, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string appName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -519,9 +519,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.BindingResourceCollection value = default; + BindingResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.BindingResourceCollection.DeserializeBindingResourceCollection(document.RootElement); + value = BindingResourceList.DeserializeBindingResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -538,7 +538,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 appName, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string appName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -552,9 +552,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.BindingResourceCollection value = default; + BindingResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.BindingResourceCollection.DeserializeBindingResourceCollection(document.RootElement); + value = BindingResourceList.DeserializeBindingResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: 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 ac5483639afbd..d57e621b69edd 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceAgentPoolRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceAgentPoolRestOperations.cs @@ -68,7 +68,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 buildServiceName, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -81,9 +81,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.BuildServiceAgentPoolResourceCollection value = default; + BuildServiceAgentPoolResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.BuildServiceAgentPoolResourceCollection.DeserializeBuildServiceAgentPoolResourceCollection(document.RootElement); + value = BuildServiceAgentPoolResourceList.DeserializeBuildServiceAgentPoolResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -99,7 +99,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 buildServiceName, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -112,9 +112,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.BuildServiceAgentPoolResourceCollection value = default; + BuildServiceAgentPoolResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.BuildServiceAgentPoolResourceCollection.DeserializeBuildServiceAgentPoolResourceCollection(document.RootElement); + value = BuildServiceAgentPoolResourceList.DeserializeBuildServiceAgentPoolResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -155,7 +155,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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 buildServiceName, string agentPoolName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string agentPoolName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -169,13 +169,13 @@ public async Task> GetAsync(string s { case 200: { - BuildServiceAgentPoolResourceData value = default; + AppBuildServiceAgentPoolResourceData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = BuildServiceAgentPoolResourceData.DeserializeBuildServiceAgentPoolResourceData(document.RootElement); + value = AppBuildServiceAgentPoolResourceData.DeserializeAppBuildServiceAgentPoolResourceData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((BuildServiceAgentPoolResourceData)null, message.Response); + return Response.FromValue((AppBuildServiceAgentPoolResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -190,7 +190,7 @@ public async Task> GetAsync(string s /// 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 buildServiceName, string agentPoolName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string agentPoolName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -204,19 +204,19 @@ public Response Get(string subscriptionId, st { case 200: { - BuildServiceAgentPoolResourceData value = default; + AppBuildServiceAgentPoolResourceData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = BuildServiceAgentPoolResourceData.DeserializeBuildServiceAgentPoolResourceData(document.RootElement); + value = AppBuildServiceAgentPoolResourceData.DeserializeAppBuildServiceAgentPoolResourceData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((BuildServiceAgentPoolResourceData)null, message.Response); + return Response.FromValue((AppBuildServiceAgentPoolResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateUpdatePutRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string agentPoolName, BuildServiceAgentPoolResourceData data) + internal HttpMessage CreateUpdatePutRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string agentPoolName, AppBuildServiceAgentPoolResourceData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -254,7 +254,7 @@ internal HttpMessage CreateUpdatePutRequest(string subscriptionId, string resour /// The cancellation token to use. /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public async Task UpdatePutAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string agentPoolName, BuildServiceAgentPoolResourceData data, CancellationToken cancellationToken = default) + public async Task UpdatePutAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string agentPoolName, AppBuildServiceAgentPoolResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -285,7 +285,7 @@ public async Task UpdatePutAsync(string subscriptionId, string resourc /// The cancellation token to use. /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public Response UpdatePut(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string agentPoolName, BuildServiceAgentPoolResourceData data, CancellationToken cancellationToken = default) + public Response UpdatePut(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string agentPoolName, AppBuildServiceAgentPoolResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -329,7 +329,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 buildServiceName, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -343,9 +343,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.BuildServiceAgentPoolResourceCollection value = default; + BuildServiceAgentPoolResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.BuildServiceAgentPoolResourceCollection.DeserializeBuildServiceAgentPoolResourceCollection(document.RootElement); + value = BuildServiceAgentPoolResourceList.DeserializeBuildServiceAgentPoolResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -362,7 +362,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 buildServiceName, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -376,9 +376,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.BuildServiceAgentPoolResourceCollection value = default; + BuildServiceAgentPoolResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.BuildServiceAgentPoolResourceCollection.DeserializeBuildServiceAgentPoolResourceCollection(document.RootElement); + value = BuildServiceAgentPoolResourceList.DeserializeBuildServiceAgentPoolResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: 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 1807023e95b5d..8c32056f523ec 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceBuilderRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceBuilderRestOperations.cs @@ -70,7 +70,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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 buildServiceName, string builderName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string builderName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -84,13 +84,13 @@ public async Task> GetAsync(string subscriptionId, { case 200: { - BuilderResourceData value = default; + AppBuilderResourceData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = BuilderResourceData.DeserializeBuilderResourceData(document.RootElement); + value = AppBuilderResourceData.DeserializeAppBuilderResourceData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((BuilderResourceData)null, message.Response); + return Response.FromValue((AppBuilderResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -105,7 +105,7 @@ public async Task> GetAsync(string subscriptionId, /// 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 buildServiceName, string builderName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string builderName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -119,19 +119,19 @@ public Response Get(string subscriptionId, string resourceG { case 200: { - BuilderResourceData value = default; + AppBuilderResourceData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = BuilderResourceData.DeserializeBuilderResourceData(document.RootElement); + value = AppBuilderResourceData.DeserializeAppBuilderResourceData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((BuilderResourceData)null, message.Response); + return Response.FromValue((AppBuilderResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string builderName, BuilderResourceData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string builderName, AppBuilderResourceData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -169,7 +169,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// 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, string builderName, BuilderResourceData data, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string builderName, AppBuilderResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -200,7 +200,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re /// 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, string builderName, BuilderResourceData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string builderName, AppBuilderResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -336,7 +336,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 buildServiceName, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -349,9 +349,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.BuilderResourceCollection value = default; + AppBuilderResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.BuilderResourceCollection.DeserializeBuilderResourceCollection(document.RootElement); + value = AppBuilderResourceList.DeserializeAppBuilderResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -367,7 +367,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 buildServiceName, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -380,9 +380,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.BuilderResourceCollection value = default; + AppBuilderResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.BuilderResourceCollection.DeserializeBuilderResourceCollection(document.RootElement); + value = AppBuilderResourceList.DeserializeAppBuilderResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -413,7 +413,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 buildServiceName, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -427,9 +427,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.BuilderResourceCollection value = default; + AppBuilderResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.BuilderResourceCollection.DeserializeBuilderResourceCollection(document.RootElement); + value = AppBuilderResourceList.DeserializeAppBuilderResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -446,7 +446,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 buildServiceName, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -460,9 +460,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.BuilderResourceCollection value = default; + AppBuilderResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.BuilderResourceCollection.DeserializeBuilderResourceCollection(document.RootElement); + value = AppBuilderResourceList.DeserializeAppBuilderResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: 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 01f53eaa43e74..f85b7c7473705 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceRestOperations.cs @@ -65,7 +65,7 @@ internal HttpMessage CreateListBuildServicesRequest(string subscriptionId, strin /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListBuildServicesAsync(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + public async Task> ListBuildServicesAsync(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -77,9 +77,9 @@ internal HttpMessage CreateListBuildServicesRequest(string subscriptionId, strin { case 200: { - Models.BuildServiceCollection value = default; + AppBuildServiceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.BuildServiceCollection.DeserializeBuildServiceCollection(document.RootElement); + value = AppBuildServiceList.DeserializeAppBuildServiceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -94,7 +94,7 @@ internal HttpMessage CreateListBuildServicesRequest(string subscriptionId, strin /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListBuildServices(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + public Response ListBuildServices(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -106,9 +106,9 @@ internal HttpMessage CreateListBuildServicesRequest(string subscriptionId, strin { case 200: { - Models.BuildServiceCollection value = default; + AppBuildServiceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.BuildServiceCollection.DeserializeBuildServiceCollection(document.RootElement); + value = AppBuildServiceList.DeserializeAppBuildServiceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -146,7 +146,7 @@ internal HttpMessage CreateGetBuildServiceRequest(string subscriptionId, string /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetBuildServiceAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) + public async Task> GetBuildServiceAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -159,13 +159,13 @@ public async Task> GetBuildServiceAsync(string subscr { case 200: { - BuildServiceData value = default; + AppBuildServiceData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = BuildServiceData.DeserializeBuildServiceData(document.RootElement); + value = AppBuildServiceData.DeserializeAppBuildServiceData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((BuildServiceData)null, message.Response); + return Response.FromValue((AppBuildServiceData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -179,7 +179,7 @@ public async Task> GetBuildServiceAsync(string subscr /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response GetBuildService(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) + public Response GetBuildService(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -192,13 +192,13 @@ public Response GetBuildService(string subscriptionId, string { case 200: { - BuildServiceData value = default; + AppBuildServiceData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = BuildServiceData.DeserializeBuildServiceData(document.RootElement); + value = AppBuildServiceData.DeserializeAppBuildServiceData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((BuildServiceData)null, message.Response); + return Response.FromValue((AppBuildServiceData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -235,7 +235,7 @@ internal HttpMessage CreateListBuildsRequest(string subscriptionId, string resou /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListBuildsAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) + public async Task> ListBuildsAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -248,9 +248,9 @@ internal HttpMessage CreateListBuildsRequest(string subscriptionId, string resou { case 200: { - Models.BuildCollection value = default; + AppBuildList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.BuildCollection.DeserializeBuildCollection(document.RootElement); + value = AppBuildList.DeserializeAppBuildList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -266,7 +266,7 @@ internal HttpMessage CreateListBuildsRequest(string subscriptionId, string resou /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ListBuilds(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) + public Response ListBuilds(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -279,9 +279,9 @@ internal HttpMessage CreateListBuildsRequest(string subscriptionId, string resou { case 200: { - Models.BuildCollection value = default; + AppBuildList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.BuildCollection.DeserializeBuildCollection(document.RootElement); + value = AppBuildList.DeserializeAppBuildList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -322,7 +322,7 @@ internal HttpMessage CreateGetBuildRequest(string subscriptionId, string resourc /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetBuildAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, CancellationToken cancellationToken = default) + public async Task> GetBuildAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -336,13 +336,13 @@ public async Task> GetBuildAsync(string subscriptionId, stri { case 200: { - BuildData value = default; + AppBuildData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = BuildData.DeserializeBuildData(document.RootElement); + value = AppBuildData.DeserializeAppBuildData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((BuildData)null, message.Response); + return Response.FromValue((AppBuildData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -357,7 +357,7 @@ public async Task> GetBuildAsync(string subscriptionId, stri /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public Response GetBuild(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, CancellationToken cancellationToken = default) + public Response GetBuild(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -371,19 +371,19 @@ public Response GetBuild(string subscriptionId, string resourceGroupN { case 200: { - BuildData value = default; + AppBuildData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = BuildData.DeserializeBuildData(document.RootElement); + value = AppBuildData.DeserializeAppBuildData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((BuildData)null, message.Response); + return Response.FromValue((AppBuildData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateOrUpdateBuildRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, BuildData data) + internal HttpMessage CreateCreateOrUpdateBuildRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, AppBuildData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -421,7 +421,7 @@ internal HttpMessage CreateCreateOrUpdateBuildRequest(string subscriptionId, str /// The cancellation token to use. /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateBuildAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, BuildData data, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateBuildAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, AppBuildData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -437,9 +437,9 @@ public async Task> CreateOrUpdateBuildAsync(string subscript case 200: case 201: { - BuildData value = default; + AppBuildData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = BuildData.DeserializeBuildData(document.RootElement); + value = AppBuildData.DeserializeAppBuildData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -457,7 +457,7 @@ public async Task> CreateOrUpdateBuildAsync(string subscript /// The cancellation token to use. /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdateBuild(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, BuildData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdateBuild(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, AppBuildData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -473,9 +473,9 @@ public Response CreateOrUpdateBuild(string subscriptionId, string res case 200: case 201: { - BuildData value = default; + AppBuildData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = BuildData.DeserializeBuildData(document.RootElement); + value = AppBuildData.DeserializeAppBuildData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -517,7 +517,7 @@ internal HttpMessage CreateListBuildResultsRequest(string subscriptionId, string /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public async Task> ListBuildResultsAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, CancellationToken cancellationToken = default) + public async Task> ListBuildResultsAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -531,9 +531,9 @@ internal HttpMessage CreateListBuildResultsRequest(string subscriptionId, string { case 200: { - Models.BuildResultCollection value = default; + AppBuildResultList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.BuildResultCollection.DeserializeBuildResultCollection(document.RootElement); + value = AppBuildResultList.DeserializeAppBuildResultList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -550,7 +550,7 @@ internal HttpMessage CreateListBuildResultsRequest(string subscriptionId, string /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public Response ListBuildResults(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, CancellationToken cancellationToken = default) + public Response ListBuildResults(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -564,9 +564,9 @@ internal HttpMessage CreateListBuildResultsRequest(string subscriptionId, string { case 200: { - Models.BuildResultCollection value = default; + AppBuildResultList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.BuildResultCollection.DeserializeBuildResultCollection(document.RootElement); + value = AppBuildResultList.DeserializeAppBuildResultList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -610,7 +610,7 @@ internal HttpMessage CreateGetBuildResultRequest(string subscriptionId, string r /// The cancellation token to use. /// , , , , or is null. /// , , , , or is an empty string, and was expected to be non-empty. - public async Task> GetBuildResultAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, string buildResultName, CancellationToken cancellationToken = default) + public async Task> GetBuildResultAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, string buildResultName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -625,13 +625,13 @@ public async Task> GetBuildResultAsync(string subscrip { case 200: { - BuildResultData value = default; + AppBuildResultData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = BuildResultData.DeserializeBuildResultData(document.RootElement); + value = AppBuildResultData.DeserializeAppBuildResultData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((BuildResultData)null, message.Response); + return Response.FromValue((AppBuildResultData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -647,7 +647,7 @@ public async Task> GetBuildResultAsync(string subscrip /// The cancellation token to use. /// , , , , or is null. /// , , , , or is an empty string, and was expected to be non-empty. - public Response GetBuildResult(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, string buildResultName, CancellationToken cancellationToken = default) + public Response GetBuildResult(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, string buildResultName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -662,13 +662,13 @@ public Response GetBuildResult(string subscriptionId, string re { case 200: { - BuildResultData value = default; + AppBuildResultData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = BuildResultData.DeserializeBuildResultData(document.RootElement); + value = AppBuildResultData.DeserializeAppBuildResultData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((BuildResultData)null, message.Response); + return Response.FromValue((AppBuildResultData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -887,7 +887,7 @@ internal HttpMessage CreateListSupportedBuildpacksRequest(string subscriptionId, /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListSupportedBuildpacksAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) + public async Task> ListSupportedBuildpacksAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -900,9 +900,9 @@ public async Task> ListSupportedBuildpac { case 200: { - SupportedBuildpacksCollection value = default; + SupportedBuildpacksList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SupportedBuildpacksCollection.DeserializeSupportedBuildpacksCollection(document.RootElement); + value = SupportedBuildpacksList.DeserializeSupportedBuildpacksList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -918,7 +918,7 @@ public async Task> ListSupportedBuildpac /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ListSupportedBuildpacks(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) + public Response ListSupportedBuildpacks(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -931,9 +931,9 @@ public Response ListSupportedBuildpacks(string su { case 200: { - SupportedBuildpacksCollection value = default; + SupportedBuildpacksList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SupportedBuildpacksCollection.DeserializeSupportedBuildpacksCollection(document.RootElement); + value = SupportedBuildpacksList.DeserializeSupportedBuildpacksList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1066,7 +1066,7 @@ internal HttpMessage CreateListSupportedStacksRequest(string subscriptionId, str /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListSupportedStacksAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) + public async Task> ListSupportedStacksAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -1079,9 +1079,9 @@ public async Task> ListSupportedStacksAsync( { case 200: { - SupportedStacksCollection value = default; + SupportedStacksList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SupportedStacksCollection.DeserializeSupportedStacksCollection(document.RootElement); + value = SupportedStacksList.DeserializeSupportedStacksList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1097,7 +1097,7 @@ public async Task> ListSupportedStacksAsync( /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ListSupportedStacks(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) + public Response ListSupportedStacks(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -1110,9 +1110,9 @@ public Response ListSupportedStacks(string subscripti { case 200: { - SupportedStacksCollection value = default; + SupportedStacksList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SupportedStacksCollection.DeserializeSupportedStacksCollection(document.RootElement); + value = SupportedStacksList.DeserializeSupportedStacksList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1236,7 +1236,7 @@ internal HttpMessage CreateListBuildServicesNextPageRequest(string nextLink, str /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListBuildServicesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + public async Task> ListBuildServicesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -1249,9 +1249,9 @@ internal HttpMessage CreateListBuildServicesNextPageRequest(string nextLink, str { case 200: { - Models.BuildServiceCollection value = default; + AppBuildServiceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.BuildServiceCollection.DeserializeBuildServiceCollection(document.RootElement); + value = AppBuildServiceList.DeserializeAppBuildServiceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1267,7 +1267,7 @@ internal HttpMessage CreateListBuildServicesNextPageRequest(string nextLink, str /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListBuildServicesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + public Response ListBuildServicesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -1280,9 +1280,9 @@ internal HttpMessage CreateListBuildServicesNextPageRequest(string nextLink, str { case 200: { - Models.BuildServiceCollection value = default; + AppBuildServiceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.BuildServiceCollection.DeserializeBuildServiceCollection(document.RootElement); + value = AppBuildServiceList.DeserializeAppBuildServiceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1313,7 +1313,7 @@ internal HttpMessage CreateListBuildsNextPageRequest(string nextLink, string sub /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListBuildsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) + public async Task> ListBuildsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -1327,9 +1327,9 @@ internal HttpMessage CreateListBuildsNextPageRequest(string nextLink, string sub { case 200: { - Models.BuildCollection value = default; + AppBuildList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.BuildCollection.DeserializeBuildCollection(document.RootElement); + value = AppBuildList.DeserializeAppBuildList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1346,7 +1346,7 @@ internal HttpMessage CreateListBuildsNextPageRequest(string nextLink, string sub /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ListBuildsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) + public Response ListBuildsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -1360,9 +1360,9 @@ internal HttpMessage CreateListBuildsNextPageRequest(string nextLink, string sub { case 200: { - Models.BuildCollection value = default; + AppBuildList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.BuildCollection.DeserializeBuildCollection(document.RootElement); + value = AppBuildList.DeserializeAppBuildList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1394,7 +1394,7 @@ internal HttpMessage CreateListBuildResultsNextPageRequest(string nextLink, stri /// The cancellation token to use. /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public async Task> ListBuildResultsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, CancellationToken cancellationToken = default) + public async Task> ListBuildResultsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -1409,9 +1409,9 @@ internal HttpMessage CreateListBuildResultsNextPageRequest(string nextLink, stri { case 200: { - Models.BuildResultCollection value = default; + AppBuildResultList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.BuildResultCollection.DeserializeBuildResultCollection(document.RootElement); + value = AppBuildResultList.DeserializeAppBuildResultList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1429,7 +1429,7 @@ internal HttpMessage CreateListBuildResultsNextPageRequest(string nextLink, stri /// The cancellation token to use. /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public Response ListBuildResultsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, CancellationToken cancellationToken = default) + public Response ListBuildResultsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string buildName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -1444,9 +1444,9 @@ internal HttpMessage CreateListBuildResultsNextPageRequest(string nextLink, stri { case 200: { - Models.BuildResultCollection value = default; + AppBuildResultList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.BuildResultCollection.DeserializeBuildResultCollection(document.RootElement); + value = AppBuildResultList.DeserializeAppBuildResultList(document.RootElement); return Response.FromValue(value, message.Response); } default: 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 2b267795b0c2b..2f742d8a21886 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildpackBindingRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildpackBindingRestOperations.cs @@ -357,7 +357,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 buildServiceName, string builderName, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string builderName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -371,9 +371,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.BuildpackBindingResourceCollection value = default; + BuildpackBindingResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.BuildpackBindingResourceCollection.DeserializeBuildpackBindingResourceCollection(document.RootElement); + value = BuildpackBindingResourceList.DeserializeBuildpackBindingResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -390,7 +390,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 buildServiceName, string builderName, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string builderName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -404,9 +404,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.BuildpackBindingResourceCollection value = default; + BuildpackBindingResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.BuildpackBindingResourceCollection.DeserializeBuildpackBindingResourceCollection(document.RootElement); + value = BuildpackBindingResourceList.DeserializeBuildpackBindingResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -438,7 +438,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 buildServiceName, string builderName, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string builderName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -453,9 +453,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.BuildpackBindingResourceCollection value = default; + BuildpackBindingResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.BuildpackBindingResourceCollection.DeserializeBuildpackBindingResourceCollection(document.RootElement); + value = BuildpackBindingResourceList.DeserializeBuildpackBindingResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -473,7 +473,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 buildServiceName, string builderName, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, string builderName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -488,9 +488,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.BuildpackBindingResourceCollection value = default; + BuildpackBindingResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.BuildpackBindingResourceCollection.DeserializeBuildpackBindingResourceCollection(document.RootElement); + value = BuildpackBindingResourceList.DeserializeBuildpackBindingResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: 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 db274566b28fd..ebde943ee6ebf 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/CertificatesRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/CertificatesRestOperations.cs @@ -317,7 +317,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -329,9 +329,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.CertificateResourceCollection value = default; + CertificateResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.CertificateResourceCollection.DeserializeCertificateResourceCollection(document.RootElement); + value = CertificateResourceList.DeserializeCertificateResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -346,7 +346,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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) + public Response List(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -358,9 +358,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.CertificateResourceCollection value = default; + CertificateResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.CertificateResourceCollection.DeserializeCertificateResourceCollection(document.RootElement); + value = CertificateResourceList.DeserializeCertificateResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -390,7 +390,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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) + 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)); @@ -403,9 +403,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.CertificateResourceCollection value = default; + CertificateResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.CertificateResourceCollection.DeserializeCertificateResourceCollection(document.RootElement); + value = CertificateResourceList.DeserializeCertificateResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -421,7 +421,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -434,9 +434,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.CertificateResourceCollection value = default; + CertificateResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.CertificateResourceCollection.DeserializeCertificateResourceCollection(document.RootElement); + value = CertificateResourceList.DeserializeCertificateResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: 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 47da6bef28286..3ac213c966d60 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ConfigurationServicesRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ConfigurationServicesRestOperations.cs @@ -315,7 +315,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -327,9 +327,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.ConfigurationServiceResourceCollection value = default; + ConfigurationServiceResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.ConfigurationServiceResourceCollection.DeserializeConfigurationServiceResourceCollection(document.RootElement); + value = ConfigurationServiceResourceList.DeserializeConfigurationServiceResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -344,7 +344,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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) + public Response List(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -356,9 +356,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.ConfigurationServiceResourceCollection value = default; + ConfigurationServiceResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.ConfigurationServiceResourceCollection.DeserializeConfigurationServiceResourceCollection(document.RootElement); + value = ConfigurationServiceResourceList.DeserializeConfigurationServiceResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -473,7 +473,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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) + 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)); @@ -486,9 +486,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.ConfigurationServiceResourceCollection value = default; + ConfigurationServiceResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.ConfigurationServiceResourceCollection.DeserializeConfigurationServiceResourceCollection(document.RootElement); + value = ConfigurationServiceResourceList.DeserializeConfigurationServiceResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -504,7 +504,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -517,9 +517,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.ConfigurationServiceResourceCollection value = default; + ConfigurationServiceResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.ConfigurationServiceResourceCollection.DeserializeConfigurationServiceResourceCollection(document.RootElement); + value = ConfigurationServiceResourceList.DeserializeConfigurationServiceResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: 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 506ab5f5a015e..9e059c00c5ee7 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/CustomDomainsRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/CustomDomainsRestOperations.cs @@ -428,7 +428,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 appName, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -441,9 +441,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.CustomDomainResourceCollection value = default; + CustomDomainResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.CustomDomainResourceCollection.DeserializeCustomDomainResourceCollection(document.RootElement); + value = CustomDomainResourceList.DeserializeCustomDomainResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -459,7 +459,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 appName, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string serviceName, string appName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -472,9 +472,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.CustomDomainResourceCollection value = default; + CustomDomainResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.CustomDomainResourceCollection.DeserializeCustomDomainResourceCollection(document.RootElement); + value = CustomDomainResourceList.DeserializeCustomDomainResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -505,7 +505,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 appName, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string appName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -519,9 +519,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.CustomDomainResourceCollection value = default; + CustomDomainResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.CustomDomainResourceCollection.DeserializeCustomDomainResourceCollection(document.RootElement); + value = CustomDomainResourceList.DeserializeCustomDomainResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -538,7 +538,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 appName, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string appName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -552,9 +552,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.CustomDomainResourceCollection value = default; + CustomDomainResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.CustomDomainResourceCollection.DeserializeCustomDomainResourceCollection(document.RootElement); + value = CustomDomainResourceList.DeserializeCustomDomainResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: 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 357b3ec33c32e..d1e3d0d416b4f 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/DeploymentsRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/DeploymentsRestOperations.cs @@ -71,7 +71,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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 appName, string deploymentName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -85,13 +85,13 @@ public async Task> GetAsync(string subscription { case 200: { - DeploymentResourceData value = default; + AppDeploymentResourceData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DeploymentResourceData.DeserializeDeploymentResourceData(document.RootElement); + value = AppDeploymentResourceData.DeserializeAppDeploymentResourceData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((DeploymentResourceData)null, message.Response); + return Response.FromValue((AppDeploymentResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -106,7 +106,7 @@ public async Task> GetAsync(string subscription /// 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 appName, string deploymentName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -120,19 +120,19 @@ public Response Get(string subscriptionId, string resour { case 200: { - DeploymentResourceData value = default; + AppDeploymentResourceData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DeploymentResourceData.DeserializeDeploymentResourceData(document.RootElement); + value = AppDeploymentResourceData.DeserializeAppDeploymentResourceData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((DeploymentResourceData)null, message.Response); + return Response.FromValue((AppDeploymentResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DeploymentResourceData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, AppDeploymentResourceData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -170,7 +170,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// 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 appName, string deploymentName, DeploymentResourceData data, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, AppDeploymentResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -202,7 +202,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re /// 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 appName, string deploymentName, DeploymentResourceData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, AppDeploymentResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -308,7 +308,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string s } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DeploymentResourceData data) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, AppDeploymentResourceData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -346,7 +346,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DeploymentResourceData data, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, AppDeploymentResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -377,7 +377,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// The cancellation token to use. /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DeploymentResourceData data, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, AppDeploymentResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -437,7 +437,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 appName, IEnumerable version = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, IEnumerable version = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -450,9 +450,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.DeploymentResourceCollection value = default; + DeploymentResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.DeploymentResourceCollection.DeserializeDeploymentResourceCollection(document.RootElement); + value = DeploymentResourceList.DeserializeDeploymentResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -469,7 +469,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 appName, IEnumerable version = null, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string serviceName, string appName, IEnumerable version = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -482,9 +482,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.DeploymentResourceCollection value = default; + DeploymentResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.DeploymentResourceCollection.DeserializeDeploymentResourceCollection(document.RootElement); + value = DeploymentResourceList.DeserializeDeploymentResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -528,7 +528,7 @@ internal HttpMessage CreateListForClusterRequest(string subscriptionId, string r /// 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, IEnumerable version = null, CancellationToken cancellationToken = default) + public async Task> ListForClusterAsync(string subscriptionId, string resourceGroupName, string serviceName, IEnumerable version = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -540,9 +540,9 @@ internal HttpMessage CreateListForClusterRequest(string subscriptionId, string r { case 200: { - Models.DeploymentResourceCollection value = default; + DeploymentResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.DeploymentResourceCollection.DeserializeDeploymentResourceCollection(document.RootElement); + value = DeploymentResourceList.DeserializeDeploymentResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -558,7 +558,7 @@ internal HttpMessage CreateListForClusterRequest(string subscriptionId, string r /// 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, IEnumerable version = null, CancellationToken cancellationToken = default) + public Response ListForCluster(string subscriptionId, string resourceGroupName, string serviceName, IEnumerable version = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -570,9 +570,9 @@ internal HttpMessage CreateListForClusterRequest(string subscriptionId, string r { case 200: { - Models.DeploymentResourceCollection value = default; + DeploymentResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.DeploymentResourceCollection.DeserializeDeploymentResourceCollection(document.RootElement); + value = DeploymentResourceList.DeserializeDeploymentResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1221,7 +1221,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 appName, IEnumerable version = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string appName, IEnumerable version = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -1235,9 +1235,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.DeploymentResourceCollection value = default; + DeploymentResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.DeploymentResourceCollection.DeserializeDeploymentResourceCollection(document.RootElement); + value = DeploymentResourceList.DeserializeDeploymentResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1255,7 +1255,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 appName, IEnumerable version = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string appName, IEnumerable version = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -1269,9 +1269,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.DeploymentResourceCollection value = default; + DeploymentResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.DeploymentResourceCollection.DeserializeDeploymentResourceCollection(document.RootElement); + value = DeploymentResourceList.DeserializeDeploymentResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1302,7 +1302,7 @@ internal HttpMessage CreateListForClusterNextPageRequest(string nextLink, string /// 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, IEnumerable version = null, CancellationToken cancellationToken = default) + public async Task> ListForClusterNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, IEnumerable version = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -1315,9 +1315,9 @@ internal HttpMessage CreateListForClusterNextPageRequest(string nextLink, string { case 200: { - Models.DeploymentResourceCollection value = default; + DeploymentResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.DeploymentResourceCollection.DeserializeDeploymentResourceCollection(document.RootElement); + value = DeploymentResourceList.DeserializeDeploymentResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1334,7 +1334,7 @@ internal HttpMessage CreateListForClusterNextPageRequest(string nextLink, string /// 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, IEnumerable version = null, CancellationToken cancellationToken = default) + public Response ListForClusterNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, IEnumerable version = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -1347,9 +1347,9 @@ internal HttpMessage CreateListForClusterNextPageRequest(string nextLink, string { case 200: { - Models.DeploymentResourceCollection value = default; + DeploymentResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.DeploymentResourceCollection.DeserializeDeploymentResourceCollection(document.RootElement); + value = DeploymentResourceList.DeserializeDeploymentResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: 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 86c889776c067..812672c371a4c 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/GatewayCustomDomainsRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/GatewayCustomDomainsRestOperations.cs @@ -336,7 +336,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 gatewayName, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -349,9 +349,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.GatewayCustomDomainResourceCollection value = default; + GatewayCustomDomainResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.GatewayCustomDomainResourceCollection.DeserializeGatewayCustomDomainResourceCollection(document.RootElement); + value = GatewayCustomDomainResourceList.DeserializeGatewayCustomDomainResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -367,7 +367,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 gatewayName, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -380,9 +380,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.GatewayCustomDomainResourceCollection value = default; + GatewayCustomDomainResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.GatewayCustomDomainResourceCollection.DeserializeGatewayCustomDomainResourceCollection(document.RootElement); + value = GatewayCustomDomainResourceList.DeserializeGatewayCustomDomainResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -413,7 +413,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 gatewayName, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -427,9 +427,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.GatewayCustomDomainResourceCollection value = default; + GatewayCustomDomainResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.GatewayCustomDomainResourceCollection.DeserializeGatewayCustomDomainResourceCollection(document.RootElement); + value = GatewayCustomDomainResourceList.DeserializeGatewayCustomDomainResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -446,7 +446,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 gatewayName, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -460,9 +460,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.GatewayCustomDomainResourceCollection value = default; + GatewayCustomDomainResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.GatewayCustomDomainResourceCollection.DeserializeGatewayCustomDomainResourceCollection(document.RootElement); + value = GatewayCustomDomainResourceList.DeserializeGatewayCustomDomainResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: 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 da2a8e8fcd623..60421856e1392 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/GatewayRouteConfigsRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/GatewayRouteConfigsRestOperations.cs @@ -336,7 +336,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 gatewayName, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -349,9 +349,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.GatewayRouteConfigResourceCollection value = default; + GatewayRouteConfigResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.GatewayRouteConfigResourceCollection.DeserializeGatewayRouteConfigResourceCollection(document.RootElement); + value = GatewayRouteConfigResourceList.DeserializeGatewayRouteConfigResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -367,7 +367,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 gatewayName, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -380,9 +380,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.GatewayRouteConfigResourceCollection value = default; + GatewayRouteConfigResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.GatewayRouteConfigResourceCollection.DeserializeGatewayRouteConfigResourceCollection(document.RootElement); + value = GatewayRouteConfigResourceList.DeserializeGatewayRouteConfigResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -413,7 +413,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 gatewayName, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -427,9 +427,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.GatewayRouteConfigResourceCollection value = default; + GatewayRouteConfigResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.GatewayRouteConfigResourceCollection.DeserializeGatewayRouteConfigResourceCollection(document.RootElement); + value = GatewayRouteConfigResourceList.DeserializeGatewayRouteConfigResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -446,7 +446,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 gatewayName, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string gatewayName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -460,9 +460,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.GatewayRouteConfigResourceCollection value = default; + GatewayRouteConfigResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.GatewayRouteConfigResourceCollection.DeserializeGatewayRouteConfigResourceCollection(document.RootElement); + value = GatewayRouteConfigResourceList.DeserializeGatewayRouteConfigResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: 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 611535d5ad400..0340aeb660ee6 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/GatewaysRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/GatewaysRestOperations.cs @@ -315,7 +315,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -327,9 +327,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.GatewayResourceCollection value = default; + GatewayResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.GatewayResourceCollection.DeserializeGatewayResourceCollection(document.RootElement); + value = GatewayResourceList.DeserializeGatewayResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -344,7 +344,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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) + public Response List(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -356,9 +356,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.GatewayResourceCollection value = default; + GatewayResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.GatewayResourceCollection.DeserializeGatewayResourceCollection(document.RootElement); + value = GatewayResourceList.DeserializeGatewayResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -481,7 +481,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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) + 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)); @@ -494,9 +494,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.GatewayResourceCollection value = default; + GatewayResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.GatewayResourceCollection.DeserializeGatewayResourceCollection(document.RootElement); + value = GatewayResourceList.DeserializeGatewayResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -512,7 +512,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -525,9 +525,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.GatewayResourceCollection value = default; + GatewayResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.GatewayResourceCollection.DeserializeGatewayResourceCollection(document.RootElement); + value = GatewayResourceList.DeserializeGatewayResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: 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 e8be40aaed789..02466ce9ac3df 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ServiceRegistriesRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ServiceRegistriesRestOperations.cs @@ -307,7 +307,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -319,9 +319,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.ServiceRegistryResourceCollection value = default; + ServiceRegistryResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.ServiceRegistryResourceCollection.DeserializeServiceRegistryResourceCollection(document.RootElement); + value = ServiceRegistryResourceList.DeserializeServiceRegistryResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -336,7 +336,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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) + public Response List(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -348,9 +348,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.ServiceRegistryResourceCollection value = default; + ServiceRegistryResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.ServiceRegistryResourceCollection.DeserializeServiceRegistryResourceCollection(document.RootElement); + value = ServiceRegistryResourceList.DeserializeServiceRegistryResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -380,7 +380,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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) + 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)); @@ -393,9 +393,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.ServiceRegistryResourceCollection value = default; + ServiceRegistryResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.ServiceRegistryResourceCollection.DeserializeServiceRegistryResourceCollection(document.RootElement); + value = ServiceRegistryResourceList.DeserializeServiceRegistryResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -411,7 +411,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -424,9 +424,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.ServiceRegistryResourceCollection value = default; + ServiceRegistryResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.ServiceRegistryResourceCollection.DeserializeServiceRegistryResourceCollection(document.RootElement); + value = ServiceRegistryResourceList.DeserializeServiceRegistryResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: 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 9e80fe0cc9106..54b5c015d921f 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/SkusRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/SkusRestOperations.cs @@ -59,7 +59,7 @@ internal HttpMessage CreateListRequest(string subscriptionId) /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -69,9 +69,9 @@ public async Task> ListAsync(string subscription { case 200: { - ResourceSkuCollection value = default; + ResourceSkuList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ResourceSkuCollection.DeserializeResourceSkuCollection(document.RootElement); + value = ResourceSkuList.DeserializeResourceSkuList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -84,7 +84,7 @@ public async Task> ListAsync(string subscription /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -94,9 +94,9 @@ public Response List(string subscriptionId, CancellationT { case 200: { - ResourceSkuCollection value = default; + ResourceSkuList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ResourceSkuCollection.DeserializeResourceSkuCollection(document.RootElement); + value = ResourceSkuList.DeserializeResourceSkuList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -124,7 +124,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -135,9 +135,9 @@ public async Task> ListNextPageAsync(string next { case 200: { - ResourceSkuCollection value = default; + ResourceSkuList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ResourceSkuCollection.DeserializeResourceSkuCollection(document.RootElement); + value = ResourceSkuList.DeserializeResourceSkuList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -151,7 +151,7 @@ public async Task> ListNextPageAsync(string next /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -162,9 +162,9 @@ public Response ListNextPage(string nextLink, string subs { case 200: { - ResourceSkuCollection value = default; + ResourceSkuList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ResourceSkuCollection.DeserializeResourceSkuCollection(document.RootElement); + value = ResourceSkuList.DeserializeResourceSkuList(document.RootElement); return Response.FromValue(value, message.Response); } default: 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 96cc3bff06837..42b88cd74f95b 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/StoragesRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/StoragesRestOperations.cs @@ -317,7 +317,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -329,9 +329,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.StorageResourceCollection value = default; + StorageResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.StorageResourceCollection.DeserializeStorageResourceCollection(document.RootElement); + value = StorageResourceList.DeserializeStorageResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -346,7 +346,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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) + public Response List(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -358,9 +358,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.StorageResourceCollection value = default; + StorageResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.StorageResourceCollection.DeserializeStorageResourceCollection(document.RootElement); + value = StorageResourceList.DeserializeStorageResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -390,7 +390,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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) + 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)); @@ -403,9 +403,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.StorageResourceCollection value = default; + StorageResourceList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.StorageResourceCollection.DeserializeStorageResourceCollection(document.RootElement); + value = StorageResourceList.DeserializeStorageResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -421,7 +421,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -434,9 +434,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.StorageResourceCollection value = default; + StorageResourceList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.StorageResourceCollection.DeserializeStorageResourceCollection(document.RootElement); + value = StorageResourceList.DeserializeStorageResourceList(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceResource.cs index 9ec1392572291..b30c4d4ee9286 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceResource.cs @@ -39,8 +39,8 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ServicesRestOperations _serviceResourceServicesRestClient; private readonly ClientDiagnostics _configServerResourceConfigServersClientDiagnostics; private readonly ConfigServersRestOperations _configServerResourceConfigServersRestClient; - private readonly ClientDiagnostics _deploymentResourceDeploymentsClientDiagnostics; - private readonly DeploymentsRestOperations _deploymentResourceDeploymentsRestClient; + private readonly ClientDiagnostics _appDeploymentResourceDeploymentsClientDiagnostics; + private readonly DeploymentsRestOperations _appDeploymentResourceDeploymentsRestClient; private readonly ServiceResourceData _data; /// Initializes a new instance of the class for mocking. @@ -68,9 +68,9 @@ internal ServiceResource(ArmClient client, ResourceIdentifier id) : base(client, _configServerResourceConfigServersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ConfigServerResource.ResourceType.Namespace, Diagnostics); TryGetApiVersion(ConfigServerResource.ResourceType, out string configServerResourceConfigServersApiVersion); _configServerResourceConfigServersRestClient = new ConfigServersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, configServerResourceConfigServersApiVersion); - _deploymentResourceDeploymentsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", DeploymentResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DeploymentResource.ResourceType, out string deploymentResourceDeploymentsApiVersion); - _deploymentResourceDeploymentsRestClient = new DeploymentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, deploymentResourceDeploymentsApiVersion); + _appDeploymentResourceDeploymentsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", AppDeploymentResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AppDeploymentResource.ResourceType, out string appDeploymentResourceDeploymentsApiVersion); + _appDeploymentResourceDeploymentsRestClient = new DeploymentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appDeploymentResourceDeploymentsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -181,11 +181,11 @@ public virtual Response GetServiceRegistryResource(stri return GetServiceRegistryResources().Get(serviceRegistryName, cancellationToken); } - /// Gets a collection of BuildServiceResources in the ServiceResource. - /// An object representing collection of BuildServiceResources and their operations over a BuildServiceResource. - public virtual BuildServiceCollection GetBuildServices() + /// Gets a collection of AppBuildServiceResources in the ServiceResource. + /// An object representing collection of AppBuildServiceResources and their operations over a AppBuildServiceResource. + public virtual AppBuildServiceCollection GetAppBuildServices() { - return GetCachedClient(Client => new BuildServiceCollection(Client, Id)); + return GetCachedClient(Client => new AppBuildServiceCollection(Client, Id)); } /// @@ -198,9 +198,9 @@ public virtual BuildServiceCollection GetBuildServices() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetBuildServiceAsync(string buildServiceName, CancellationToken cancellationToken = default) + public virtual async Task> GetAppBuildServiceAsync(string buildServiceName, CancellationToken cancellationToken = default) { - return await GetBuildServices().GetAsync(buildServiceName, cancellationToken).ConfigureAwait(false); + return await GetAppBuildServices().GetAsync(buildServiceName, cancellationToken).ConfigureAwait(false); } /// @@ -213,9 +213,9 @@ public virtual async Task> GetBuildServiceAsync(s /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetBuildService(string buildServiceName, CancellationToken cancellationToken = default) + public virtual Response GetAppBuildService(string buildServiceName, CancellationToken cancellationToken = default) { - return GetBuildServices().Get(buildServiceName, cancellationToken); + return GetAppBuildServices().Get(buildServiceName, cancellationToken); } /// Gets an object representing a MonitoringSettingResource along with the instance operations that can be performed on it in the ServiceResource. @@ -927,17 +927,17 @@ public virtual ArmOperation ValidateConfigSe /// /// Version of the deployments to be listed. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetForClusterDeploymentsAsync(IEnumerable version = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetForClusterDeploymentsAsync(IEnumerable version = null, CancellationToken cancellationToken = default) { - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("ServiceResource.GetForClusterDeployments"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("ServiceResource.GetForClusterDeployments"); scope.Start(); try { - var response = await _deploymentResourceDeploymentsRestClient.ListForClusterAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new DeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = await _appDeploymentResourceDeploymentsRestClient.ListForClusterAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new AppDeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -945,14 +945,14 @@ async Task> FirstPageFunc(int? pageSizeHint) throw; } } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) + async Task> NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("ServiceResource.GetForClusterDeployments"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("ServiceResource.GetForClusterDeployments"); scope.Start(); try { - var response = await _deploymentResourceDeploymentsRestClient.ListForClusterNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new DeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = await _appDeploymentResourceDeploymentsRestClient.ListForClusterNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new AppDeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -970,17 +970,17 @@ async Task> NextPageFunc(string nextLink, int? pageSize /// /// Version of the deployments to be listed. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetForClusterDeployments(IEnumerable version = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetForClusterDeployments(IEnumerable version = null, CancellationToken cancellationToken = default) { - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("ServiceResource.GetForClusterDeployments"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("ServiceResource.GetForClusterDeployments"); scope.Start(); try { - var response = _deploymentResourceDeploymentsRestClient.ListForCluster(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, version, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new DeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = _appDeploymentResourceDeploymentsRestClient.ListForCluster(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, version, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AppDeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -988,14 +988,14 @@ Page FirstPageFunc(int? pageSizeHint) throw; } } - Page NextPageFunc(string nextLink, int? pageSizeHint) + Page NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _deploymentResourceDeploymentsClientDiagnostics.CreateScope("ServiceResource.GetForClusterDeployments"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("ServiceResource.GetForClusterDeployments"); scope.Start(); try { - var response = _deploymentResourceDeploymentsRestClient.ListForClusterNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, version, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new DeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = _appDeploymentResourceDeploymentsRestClient.ListForClusterNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, version, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AppDeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedBuildpackResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedBuildpackResource.cs index 90e7f51677f36..447c112b78bdd 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedBuildpackResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedBuildpackResource.cs @@ -20,7 +20,7 @@ namespace Azure.ResourceManager.AppPlatform /// A Class representing a SupportedBuildpackResource 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 GetSupportedBuildpackResource method. - /// Otherwise you can get one from its parent resource using the GetSupportedBuildpackResource method. + /// Otherwise you can get one from its parent resource using the GetSupportedBuildpackResource method. /// public partial class SupportedBuildpackResource : ArmResource { diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedBuildpackResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedBuildpackResourceCollection.cs index a65b93a5e5469..8f99fa4c2c027 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedBuildpackResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedBuildpackResourceCollection.cs @@ -21,8 +21,8 @@ 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 GetSupportedBuildpackResources method from an instance of . + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetSupportedBuildpackResources method from an instance of . /// public partial class SupportedBuildpackResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable { @@ -49,8 +49,8 @@ internal SupportedBuildpackResourceCollection(ArmClient client, ResourceIdentifi internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != BuildServiceResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, BuildServiceResource.ResourceType), nameof(id)); + if (id.ResourceType != AppBuildServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AppBuildServiceResource.ResourceType), nameof(id)); } /// diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedStackResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedStackResource.cs index e2a9d5578b727..6ecc8a598be42 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedStackResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedStackResource.cs @@ -20,7 +20,7 @@ namespace Azure.ResourceManager.AppPlatform /// A Class representing a SupportedStackResource 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 GetSupportedStackResource method. - /// Otherwise you can get one from its parent resource using the GetSupportedStackResource method. + /// Otherwise you can get one from its parent resource using the GetSupportedStackResource method. /// public partial class SupportedStackResource : ArmResource { diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedStackResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedStackResourceCollection.cs index a93669d02659b..408cb159def9d 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedStackResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/SupportedStackResourceCollection.cs @@ -21,8 +21,8 @@ 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 GetSupportedStackResources method from an instance of . + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetSupportedStackResources method from an instance of . /// public partial class SupportedStackResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable { @@ -49,8 +49,8 @@ internal SupportedStackResourceCollection(ArmClient client, ResourceIdentifier i internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != BuildServiceResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, BuildServiceResource.ResourceType), nameof(id)); + if (id.ResourceType != AppBuildServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AppBuildServiceResource.ResourceType), nameof(id)); } /// diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md index 4a7ce3f129b99..52392cdb014c2 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md @@ -43,6 +43,10 @@ directive: where: $.definitions..location transform: > $['x-ms-format'] = 'azure-location'; + - from: swagger-document + where: $.definitions..resourceType + transform: > + $['x-ms-format'] = 'resource-type'; - from: swagger-document where: $.paths..parameters[?(@.name === 'location')] transform: > @@ -52,10 +56,48 @@ directive: transform: > $.CustomPersistentDiskProperties.properties.type['x-ms-enum']['name'] = 'UnderlyingResourceType'; $.DiagnosticParameters.properties.duration['x-ms-client-name'] = 'DurationValue'; + $.DeploymentResource['x-ms-client-name'] = 'AppDeploymentResource'; + $.Build['x-ms-client-name'] = 'AppBuild'; + $.BuildProperties['x-ms-client-name'] = 'AppBuildProperties'; + $.BuildProperties.properties.provisioningState['x-ms-enum']['name'] = 'AppBuildProvisioningState'; + $.BuildResult['x-ms-client-name'] = 'AppBuildResult'; + $.BuildService['x-ms-client-name'] = 'AppBuildService'; + $.BuildServiceAgentPoolResource['x-ms-client-name'] = 'AppBuildBuildServiceAgentPoolResource'; + $.BuilderResource['x-ms-client-name'] = 'AppBuilderResource'; + $.BuilderProperties['x-ms-client-name'] = 'AppBuilderProperties'; + $.BuilderProperties.properties.provisioningState['x-ms-enum']['name'] = 'AppBuilderProvisioningState'; $.LoadedCertificate.properties.resourceId['x-ms-format'] = 'arm-id'; $.BindingResourceProperties.properties.resourceId['x-ms-format'] = 'arm-id'; $.NetworkProfile.properties.serviceRuntimeSubnetId['x-ms-format'] = 'arm-id'; $.NetworkProfile.properties.appSubnetId['x-ms-format'] = 'arm-id'; $.NameAvailabilityParameters['x-ms-client-name'] = 'CheckNameAvailabilityContent'; $.NameAvailability['x-ms-client-name'] = 'CheckNameAvailabilityResult'; + $.GatewayRouteConfigResourceCollection['x-ms-client-name'] = 'GatewayRouteConfigResourceList'; + $.GatewayCustomDomainResourceCollection['x-ms-client-name'] = 'GatewayCustomDomainResourceList'; + $.ApiPortalResourceCollection['x-ms-client-name'] = 'ApiPortalResourceList'; + $.ApiPortalCustomDomainResourceCollection['x-ms-client-name'] = 'ApiPortalCustomDomainResourceList'; + $.BuildServiceCollection['x-ms-client-name'] = 'AppBuildServiceList'; + $.BuildCollection['x-ms-client-name'] = 'AppBuildList'; + $.BuildResultCollection['x-ms-client-name'] = 'AppBuildResultList'; + $.BuilderResourceCollection['x-ms-client-name'] = 'AppBuilderResourceList'; + $.SupportedBuildpacksCollection['x-ms-client-name'] = 'SupportedBuildpacksList'; + $.SupportedStacksCollection['x-ms-client-name'] = 'SupportedStacksList'; + $.BuildServiceAgentPoolResourceCollection['x-ms-client-name'] = 'BuildServiceAgentPoolResourceList'; + $.ConfigurationServiceResourceCollection['x-ms-client-name'] = 'ConfigurationServiceResourceList'; + $.ServiceRegistryResourceCollection['x-ms-client-name'] = 'ServiceRegistryResourceList'; + $.LoadedCertificateCollection['x-ms-client-name'] = 'LoadedCertificateList'; + $.AppResourceCollection['x-ms-client-name'] = 'AppResourceList'; + $.ActiveDeploymentCollection['x-ms-client-name'] = 'ActiveDeploymentList'; + $.BindingResourceCollection['x-ms-client-name'] = 'BindingResourceList'; + $.CertificateResourceCollection['x-ms-client-name'] = 'CertificateResourceList'; + $.StorageResourceCollection['x-ms-client-name'] = 'StorageResourceList'; + $.CustomPersistentDiskCollection['x-ms-client-name'] = 'CustomPersistentDiskList'; + $.CustomDomainResourceCollection['x-ms-client-name'] = 'CustomDomainResourceList'; + $.DeploymentResourceCollection['x-ms-client-name'] = 'DeploymentResourceList'; + $.AvailableOperations['x-ms-client-name'] = 'AvailableOperationsInfo'; + $.ResourceSkuCollection['x-ms-client-name'] = 'ResourceSkuList'; + $.BuildpackBindingResourceCollection['x-ms-client-name'] = 'BuildpackBindingResourceList'; + $.GatewayResourceCollection['x-ms-client-name'] = 'GatewayResourceList'; + $.ResourceSku.properties.locations.items['x-ms-format'] = 'azure-location'; + ``` \ No newline at end of file From fc6b79dcd50400e0ebf18baf32aba4873044e9dc Mon Sep 17 00:00:00 2001 From: Arthur Ma Date: Sun, 5 Jun 2022 17:02:07 +0800 Subject: [PATCH 7/9] Renames... --- ...ourceManager.AppPlatform.netstandard2.0.cs | 410 +++++++++--------- .../src/Generated/ApiPortalResource.cs | 2 +- .../Generated/ApiPortalResourceCollection.cs | 8 +- .../Generated/AppBuildServiceCollection.cs | 8 +- .../src/Generated/AppBuildServiceResource.cs | 14 +- .../src/Generated/AppDeploymentResource.cs | 30 +- .../AppDeploymentResourceCollection.cs | 8 +- ...pResource.cs => AppPlatformAppResource.cs} | 138 +++--- ...cs => AppPlatformAppResourceCollection.cs} | 114 ++--- ...eData.cs => AppPlatformAppResourceData.cs} | 12 +- ....cs => AppPlatformCustomDomainResource.cs} | 82 ++-- ...PlatformCustomDomainResourceCollection.cs} | 114 ++--- ...=> AppPlatformCustomDomainResourceData.cs} | 12 +- ...ource.cs => AppPlatformServiceResource.cs} | 232 +++++----- ...> AppPlatformServiceResourceCollection.cs} | 110 ++--- ...a.cs => AppPlatformServiceResourceData.cs} | 12 +- .../src/Generated/BindingResource.cs | 2 +- .../Generated/BindingResourceCollection.cs | 8 +- .../src/Generated/CertificateResource.cs | 2 +- .../CertificateResourceCollection.cs | 8 +- .../src/Generated/ConfigServerResource.cs | 2 +- .../Generated/ConfigurationServiceResource.cs | 2 +- .../ConfigurationServiceResourceCollection.cs | 8 +- .../Extensions/AppPlatformExtensions.cs | 82 ++-- .../ResourceGroupResourceExtensionClient.cs | 8 +- .../SubscriptionResourceExtensionClient.cs | 76 ++-- .../src/Generated/GatewayResource.cs | 2 +- .../Generated/GatewayResourceCollection.cs | 8 +- .../AppPlatformAppResourceOperationSource.cs | 40 ++ ...formCustomDomainResourceOperationSource.cs | 40 ++ ...pPlatformServiceResourceOperationSource.cs | 40 ++ .../AppResourceOperationSource.cs | 40 -- .../CustomDomainResourceOperationSource.cs | 40 -- .../ServiceResourceOperationSource.cs | 40 -- .../ApiPortalProperties.Serialization.cs | 12 +- .../Generated/Models/ApiPortalProperties.cs | 10 +- ...pPlatformAppResourceData.Serialization.cs} | 6 +- ...CustomDomainResourceData.Serialization.cs} | 6 +- ...tformServiceResourceData.Serialization.cs} | 6 +- .../Models/AppResourceList.Serialization.cs | 6 +- .../src/Generated/Models/AppResourceList.cs | 6 +- .../AppResourceProperties.Serialization.cs | 4 +- .../Generated/Models/AppResourceProperties.cs | 8 +- ... AvailableAppPlatformSku.Serialization.cs} | 6 +- ...ourceSku.cs => AvailableAppPlatformSku.cs} | 10 +- .../src/Generated/Models/BindingType.cs | 4 +- .../CustomDomainResourceList.Serialization.cs | 6 +- .../Models/CustomDomainResourceList.cs | 6 +- ...cs => LogFileUriResponse.Serialization.cs} | 6 +- ...leUrlResponse.cs => LogFileUriResponse.cs} | 6 +- .../Models/ResourceSkuList.Serialization.cs | 6 +- .../src/Generated/Models/ResourceSkuList.cs | 6 +- ...esourceSkuRestrictionInfo.Serialization.cs | 6 +- .../Models/ResourceSkuRestrictionInfo.cs | 6 +- ...eNameAvailabilityContent.Serialization.cs} | 2 +- ...t.cs => ServiceNameAvailabilityContent.cs} | 6 +- ...ceNameAvailabilityResult.Serialization.cs} | 6 +- ...lt.cs => ServiceNameAvailabilityResult.cs} | 10 +- .../ServiceResourceList.Serialization.cs | 6 +- .../Generated/Models/ServiceResourceList.cs | 6 +- .../Generated/MonitoringSettingResource.cs | 2 +- .../RestOperations/AppsRestOperations.cs | 38 +- .../BuildServiceRestOperations.cs | 10 +- .../CustomDomainsRestOperations.cs | 28 +- .../DeploymentsRestOperations.cs | 32 +- .../RestOperations/ServicesRestOperations.cs | 42 +- .../src/Generated/ServiceRegistryResource.cs | 2 +- .../ServiceRegistryResourceCollection.cs | 8 +- .../src/Generated/StorageResource.cs | 2 +- .../Generated/StorageResourceCollection.cs | 8 +- .../src/autorest.md | 15 +- 71 files changed, 1059 insertions(+), 1050 deletions(-) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{AppResource.cs => AppPlatformAppResource.cs} (70%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{AppResourceCollection.cs => AppPlatformAppResourceCollection.cs} (60%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{AppResourceData.cs => AppPlatformAppResourceData.cs} (68%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{CustomDomainResource.cs => AppPlatformCustomDomainResource.cs} (62%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{CustomDomainResourceCollection.cs => AppPlatformCustomDomainResourceCollection.cs} (58%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{CustomDomainResourceData.cs => AppPlatformCustomDomainResourceData.cs} (56%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{ServiceResource.cs => AppPlatformServiceResource.cs} (79%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{ServiceResourceCollection.cs => AppPlatformServiceResourceCollection.cs} (59%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/{ServiceResourceData.cs => AppPlatformServiceResourceData.cs} (61%) create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppPlatformAppResourceOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppPlatformCustomDomainResourceOperationSource.cs create mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppPlatformServiceResourceOperationSource.cs delete mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppResourceOperationSource.cs delete mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/CustomDomainResourceOperationSource.cs delete mode 100644 sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ServiceResourceOperationSource.cs rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{AppResourceData.Serialization.cs => AppPlatformAppResourceData.Serialization.cs} (92%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{CustomDomainResourceData.Serialization.cs => AppPlatformCustomDomainResourceData.Serialization.cs} (87%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{ServiceResourceData.Serialization.cs => AppPlatformServiceResourceData.Serialization.cs} (92%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{ResourceSku.Serialization.cs => AvailableAppPlatformSku.Serialization.cs} (91%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{ResourceSku.cs => AvailableAppPlatformSku.cs} (82%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{LogFileUrlResponse.Serialization.cs => LogFileUriResponse.Serialization.cs} (79%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{LogFileUrlResponse.cs => LogFileUriResponse.cs} (82%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{CheckNameAvailabilityContent.Serialization.cs => ServiceNameAvailabilityContent.Serialization.cs} (88%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{CheckNameAvailabilityContent.cs => ServiceNameAvailabilityContent.cs} (83%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{CheckNameAvailabilityResult.Serialization.cs => ServiceNameAvailabilityResult.Serialization.cs} (81%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{CheckNameAvailabilityResult.cs => ServiceNameAvailabilityResult.cs} (72%) 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 35598244d3f3c..a0c7b0acc8024 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 @@ -244,8 +244,8 @@ protected AppBuildServiceResource() { } public virtual System.Threading.Tasks.Task> GetAppBuildServiceAgentPoolResourceAsync(string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppPlatform.AppBuildServiceAgentPoolResourceCollection GetAppBuildServiceAgentPoolResources() { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetResourceUploadUrl(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetResourceUploadUrlAsync(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.Response GetSupportedBuildpackResource(string buildpackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSupportedBuildpackResourceAsync(string buildpackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppPlatform.SupportedBuildpackResourceCollection GetSupportedBuildpackResources() { throw null; } @@ -268,14 +268,14 @@ protected AppDeploymentResource() { } public virtual System.Threading.Tasks.Task GenerateThreadDumpAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, 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 GetLogFileUrl(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetLogFileUrlAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetLogFileUri(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetLogFileUriAsync(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 Start(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task StartAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation StartJFR(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StartJFRAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation StartJfr(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartJfrAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Stop(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task StopAsync(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.AppDeploymentResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -302,10 +302,95 @@ public AppDeploymentResourceData() { } public Azure.ResourceManager.AppPlatform.Models.DeploymentResourceProperties Properties { get { throw null; } set { } } public Azure.ResourceManager.AppPlatform.Models.AppPlatformSku Sku { get { throw null; } set { } } } + public partial class AppPlatformAppResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AppPlatformAppResource() { } + public virtual Azure.ResourceManager.AppPlatform.AppPlatformAppResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string appName) { 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(string syncStatus = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAppDeploymentResource(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAppDeploymentResourceAsync(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.AppDeploymentResourceCollection GetAppDeploymentResources() { throw null; } + public virtual Azure.Response GetAppPlatformCustomDomainResource(string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAppPlatformCustomDomainResourceAsync(string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.AppPlatformCustomDomainResourceCollection GetAppPlatformCustomDomainResources() { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string syncStatus = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetBindingResource(string bindingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBindingResourceAsync(string bindingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.BindingResourceCollection GetBindingResources() { 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 SetActiveDeployments(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.ActiveDeploymentList activeDeploymentCollection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetActiveDeploymentsAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.ActiveDeploymentList activeDeploymentCollection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.AppPlatformAppResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.AppPlatformAppResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ValidateDomain(Azure.ResourceManager.AppPlatform.Models.CustomDomainValidatePayload validatePayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ValidateDomainAsync(Azure.ResourceManager.AppPlatform.Models.CustomDomainValidatePayload validatePayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class AppPlatformAppResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AppPlatformAppResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string appName, Azure.ResourceManager.AppPlatform.AppPlatformAppResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string appName, Azure.ResourceManager.AppPlatform.AppPlatformAppResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string appName, string syncStatus = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string appName, string syncStatus = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string appName, string syncStatus = null, 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 appName, string syncStatus = null, 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 AppPlatformAppResourceData : Azure.ResourceManager.Models.ResourceData + { + public AppPlatformAppResourceData() { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.Core.AzureLocation? Location { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.AppResourceProperties Properties { get { throw null; } set { } } + } + public partial class AppPlatformCustomDomainResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AppPlatformCustomDomainResource() { } + public virtual Azure.ResourceManager.AppPlatform.AppPlatformCustomDomainResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string appName, string domainName) { 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.AppPlatformCustomDomainResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.AppPlatformCustomDomainResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class AppPlatformCustomDomainResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AppPlatformCustomDomainResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string domainName, Azure.ResourceManager.AppPlatform.AppPlatformCustomDomainResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string domainName, Azure.ResourceManager.AppPlatform.AppPlatformCustomDomainResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string domainName, 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 domainName, 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 AppPlatformCustomDomainResourceData : Azure.ResourceManager.Models.ResourceData + { + public AppPlatformCustomDomainResourceData() { } + public Azure.ResourceManager.AppPlatform.Models.CustomDomainProperties Properties { get { throw null; } set { } } + } public static partial class AppPlatformExtensions { - public static Azure.Response CheckServiceNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.AppPlatform.Models.CheckNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> CheckServiceNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.AppPlatform.Models.CheckNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response CheckServiceNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.AppPlatform.Models.ServiceNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> CheckServiceNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.AppPlatform.Models.ServiceNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.AppPlatform.ApiPortalCustomDomainResource GetApiPortalCustomDomainResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.ApiPortalResource GetApiPortalResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.AppBuilderResource GetAppBuilderResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -314,13 +399,19 @@ public static partial class AppPlatformExtensions public static Azure.ResourceManager.AppPlatform.AppBuildServiceAgentPoolResource GetAppBuildServiceAgentPoolResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.AppBuildServiceResource GetAppBuildServiceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.AppDeploymentResource GetAppDeploymentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.AppPlatform.AppResource GetAppResource(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; } + public static Azure.ResourceManager.AppPlatform.AppPlatformCustomDomainResource GetAppPlatformCustomDomainResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppPlatform.AppPlatformServiceResource GetAppPlatformServiceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetAppPlatformServiceResource(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetAppPlatformServiceResourceAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.AppPlatform.AppPlatformServiceResourceCollection GetAppPlatformServiceResources(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetAppPlatformServiceResources(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetAppPlatformServiceResourcesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.AppPlatform.BindingResource GetBindingResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.BuildpackBindingResource GetBuildpackBindingResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.CertificateResource GetCertificateResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.ConfigServerResource GetConfigServerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.ConfigurationServiceResource GetConfigurationServiceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.AppPlatform.CustomDomainResource GetCustomDomainResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.GatewayCustomDomainResource GetGatewayCustomDomainResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.GatewayResource GetGatewayResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.GatewayRouteConfigResource GetGatewayRouteConfigResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -328,68 +419,94 @@ public static partial class AppPlatformExtensions public static Azure.Pageable GetRuntimeVersionsRuntimeVersions(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetRuntimeVersionsRuntimeVersionsAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.AppPlatform.ServiceRegistryResource GetServiceRegistryResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.AppPlatform.ServiceResource GetServiceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Response GetServiceResource(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetServiceResourceAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.AppPlatform.ServiceResourceCollection GetServiceResources(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetServiceResources(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetServiceResourcesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, 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; } - public static Azure.AsyncPageable GetSkusAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, 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; } + public static Azure.AsyncPageable GetSkusAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.AppPlatform.StorageResource GetStorageResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.SupportedBuildpackResource GetSupportedBuildpackResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppPlatform.SupportedStackResource GetSupportedStackResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } } - public partial class AppResource : Azure.ResourceManager.ArmResource + public partial class AppPlatformServiceResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected AppResource() { } - public virtual Azure.ResourceManager.AppPlatform.AppResourceData Data { get { throw null; } } + protected AppPlatformServiceResource() { } + public virtual Azure.ResourceManager.AppPlatform.AppPlatformServiceResourceData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string appName) { throw null; } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName) { 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(string syncStatus = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetAppDeploymentResource(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAppDeploymentResourceAsync(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.AppPlatform.AppDeploymentResourceCollection GetAppDeploymentResources() { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string syncStatus = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetBindingResource(string bindingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetBindingResourceAsync(string bindingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.AppPlatform.BindingResourceCollection GetBindingResources() { throw null; } - public virtual Azure.Response GetCustomDomainResource(string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetCustomDomainResourceAsync(string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.AppPlatform.CustomDomainResourceCollection GetCustomDomainResources() { throw null; } - public virtual Azure.Response GetResourceUploadUrl(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetResourceUploadUrlAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation SetActiveDeployments(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.ActiveDeploymentList activeDeploymentCollection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetActiveDeploymentsAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.ActiveDeploymentList activeDeploymentCollection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.AppResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.AppResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response ValidateDomain(Azure.ResourceManager.AppPlatform.Models.CustomDomainValidatePayload validatePayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ValidateDomainAsync(Azure.ResourceManager.AppPlatform.Models.CustomDomainValidatePayload validatePayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DisableTestEndpoint(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DisableTestEndpointAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + 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 GetApiPortalResource(string apiPortalName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetApiPortalResourceAsync(string apiPortalName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.ApiPortalResourceCollection GetApiPortalResources() { throw null; } + public virtual Azure.Response GetAppBuildService(string buildServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAppBuildServiceAsync(string buildServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.AppBuildServiceCollection GetAppBuildServices() { throw null; } + public virtual Azure.Response GetAppPlatformAppResource(string appName, string syncStatus = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAppPlatformAppResourceAsync(string appName, string syncStatus = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.AppPlatformAppResourceCollection GetAppPlatformAppResources() { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetCertificateResource(string certificateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetCertificateResourceAsync(string certificateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.CertificateResourceCollection GetCertificateResources() { throw null; } + public virtual Azure.ResourceManager.AppPlatform.ConfigServerResource GetConfigServerResource() { throw null; } + public virtual Azure.Response GetConfigurationServiceResource(string configurationServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetConfigurationServiceResourceAsync(string configurationServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.ConfigurationServiceResourceCollection GetConfigurationServiceResources() { throw null; } + public virtual Azure.Pageable GetForClusterDeployments(System.Collections.Generic.IEnumerable version = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetForClusterDeploymentsAsync(System.Collections.Generic.IEnumerable version = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetGatewayResource(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetGatewayResourceAsync(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.GatewayResourceCollection GetGatewayResources() { throw null; } + public virtual Azure.ResourceManager.AppPlatform.MonitoringSettingResource GetMonitoringSettingResource() { throw null; } + public virtual Azure.Response GetServiceRegistryResource(string serviceRegistryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetServiceRegistryResourceAsync(string serviceRegistryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.ServiceRegistryResourceCollection GetServiceRegistryResources() { throw null; } + public virtual Azure.Response GetStorageResource(string storageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetStorageResourceAsync(string storageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppPlatform.StorageResourceCollection GetStorageResources() { 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.RegenerateTestKeyRequestPayload regenerateTestKeyRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RegenerateTestKeyAsync(Azure.ResourceManager.AppPlatform.Models.RegenerateTestKeyRequestPayload regenerateTestKeyRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Stop(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StopAsync(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.AppPlatformServiceResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.AppPlatformServiceResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ValidateConfigServer(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.ConfigServerSettings configServerSettings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ValidateConfigServerAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.ConfigServerSettings configServerSettings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class AppResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public partial class AppPlatformServiceResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { - protected AppResourceCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string appName, Azure.ResourceManager.AppPlatform.AppResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string appName, Azure.ResourceManager.AppPlatform.AppResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string appName, string syncStatus = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string appName, string syncStatus = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string appName, string syncStatus = null, 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 appName, string syncStatus = null, 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; } + protected AppPlatformServiceResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string serviceName, Azure.ResourceManager.AppPlatform.AppPlatformServiceResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string serviceName, Azure.ResourceManager.AppPlatform.AppPlatformServiceResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string serviceName, 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 serviceName, 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 AppResourceData : Azure.ResourceManager.Models.ResourceData + public partial class AppPlatformServiceResourceData : Azure.ResourceManager.Models.TrackedResourceData { - public AppResourceData() { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public Azure.Core.AzureLocation? Location { get { throw null; } set { } } - public Azure.ResourceManager.AppPlatform.Models.AppResourceProperties Properties { get { throw null; } set { } } + public AppPlatformServiceResourceData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.AppPlatform.Models.ClusterResourceProperties Properties { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.AppPlatformSku Sku { get { throw null; } set { } } } public partial class BindingResource : Azure.ResourceManager.ArmResource { @@ -548,40 +665,6 @@ public partial class ConfigurationServiceResourceData : Azure.ResourceManager.Mo public ConfigurationServiceResourceData() { } public Azure.ResourceManager.AppPlatform.Models.ConfigurationServiceProperties Properties { get { throw null; } set { } } } - public partial class CustomDomainResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected CustomDomainResource() { } - public virtual Azure.ResourceManager.AppPlatform.CustomDomainResourceData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string appName, string domainName) { 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.CustomDomainResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.CustomDomainResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class CustomDomainResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected CustomDomainResourceCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string domainName, Azure.ResourceManager.AppPlatform.CustomDomainResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string domainName, Azure.ResourceManager.AppPlatform.CustomDomainResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string domainName, 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 domainName, 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 CustomDomainResourceData : Azure.ResourceManager.Models.ResourceData - { - public CustomDomainResourceData() { } - public Azure.ResourceManager.AppPlatform.Models.CustomDomainProperties Properties { get { throw null; } set { } } - } public partial class GatewayCustomDomainResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; @@ -746,89 +829,6 @@ public partial class ServiceRegistryResourceData : Azure.ResourceManager.Models. public ServiceRegistryResourceData() { } public Azure.ResourceManager.AppPlatform.Models.ServiceRegistryProperties Properties { get { throw null; } set { } } } - public partial class ServiceResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected ServiceResource() { } - public virtual Azure.ResourceManager.AppPlatform.ServiceResourceData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName) { 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 DisableTestEndpoint(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DisableTestEndpointAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - 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 GetApiPortalResource(string apiPortalName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetApiPortalResourceAsync(string apiPortalName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.AppPlatform.ApiPortalResourceCollection GetApiPortalResources() { throw null; } - public virtual Azure.Response GetAppBuildService(string buildServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAppBuildServiceAsync(string buildServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.AppPlatform.AppBuildServiceCollection GetAppBuildServices() { throw null; } - public virtual Azure.Response GetAppResource(string appName, string syncStatus = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAppResourceAsync(string appName, string syncStatus = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.AppPlatform.AppResourceCollection GetAppResources() { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetCertificateResource(string certificateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetCertificateResourceAsync(string certificateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.AppPlatform.CertificateResourceCollection GetCertificateResources() { throw null; } - public virtual Azure.ResourceManager.AppPlatform.ConfigServerResource GetConfigServerResource() { throw null; } - public virtual Azure.Response GetConfigurationServiceResource(string configurationServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetConfigurationServiceResourceAsync(string configurationServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.AppPlatform.ConfigurationServiceResourceCollection GetConfigurationServiceResources() { throw null; } - public virtual Azure.Pageable GetForClusterDeployments(System.Collections.Generic.IEnumerable version = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetForClusterDeploymentsAsync(System.Collections.Generic.IEnumerable version = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetGatewayResource(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetGatewayResourceAsync(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.AppPlatform.GatewayResourceCollection GetGatewayResources() { throw null; } - public virtual Azure.ResourceManager.AppPlatform.MonitoringSettingResource GetMonitoringSettingResource() { throw null; } - public virtual Azure.Response GetServiceRegistryResource(string serviceRegistryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetServiceRegistryResourceAsync(string serviceRegistryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.AppPlatform.ServiceRegistryResourceCollection GetServiceRegistryResources() { throw null; } - public virtual Azure.Response GetStorageResource(string storageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetStorageResourceAsync(string storageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.AppPlatform.StorageResourceCollection GetStorageResources() { 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.RegenerateTestKeyRequestPayload regenerateTestKeyRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RegenerateTestKeyAsync(Azure.ResourceManager.AppPlatform.Models.RegenerateTestKeyRequestPayload regenerateTestKeyRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StartAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Stop(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StopAsync(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.ServiceResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.ServiceResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation ValidateConfigServer(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.ConfigServerSettings configServerSettings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ValidateConfigServerAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.ConfigServerSettings configServerSettings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class ServiceResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected ServiceResourceCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string serviceName, Azure.ResourceManager.AppPlatform.ServiceResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string serviceName, Azure.ResourceManager.AppPlatform.ServiceResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string serviceName, 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 serviceName, 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 ServiceResourceData : Azure.ResourceManager.Models.TrackedResourceData - { - public ServiceResourceData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.AppPlatform.Models.ClusterResourceProperties Properties { get { throw null; } set { } } - public Azure.ResourceManager.AppPlatform.Models.AppPlatformSku Sku { get { throw null; } set { } } - } public partial class StorageResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; @@ -942,7 +942,7 @@ public ApiPortalProperties() { } public Azure.ResourceManager.AppPlatform.Models.ApiPortalProvisioningState? ProvisioningState { get { throw null; } } public bool? Public { get { throw null; } set { } } public Azure.ResourceManager.AppPlatform.Models.ApiPortalResourceRequests ResourceRequests { get { throw null; } } - public System.Collections.Generic.IList SourceUrls { get { throw null; } } + public System.Collections.Generic.IList SourceUris { get { throw null; } } public Azure.ResourceManager.AppPlatform.Models.SsoProperties SsoProperties { get { throw null; } set { } } public System.Uri Uri { get { throw null; } } } @@ -1044,7 +1044,7 @@ public partial class AppResourceProperties public AppResourceProperties() { } public System.Collections.Generic.IDictionary> AddonConfigs { get { throw null; } } public System.Collections.Generic.IList CustomPersistentDisks { get { throw null; } } - public bool? EnableEndToEndTLS { get { throw null; } set { } } + public bool? EnableEndToEndTls { get { throw null; } set { } } public string Fqdn { get { throw null; } set { } } public bool? HttpsOnly { get { throw null; } set { } } public System.Collections.Generic.IList LoadedCertificates { get { throw null; } } @@ -1075,6 +1075,17 @@ public AppResourceProperties() { } public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.AppResourceProvisioningState left, Azure.ResourceManager.AppPlatform.Models.AppResourceProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class AvailableAppPlatformSku + { + internal AvailableAppPlatformSku() { } + public Azure.ResourceManager.AppPlatform.Models.SkuCapacity Capacity { get { throw null; } } + public System.Collections.Generic.IReadOnlyList LocationInfo { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Locations { get { throw null; } } + public string Name { get { throw null; } } + public Azure.Core.ResourceType? ResourceType { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Restrictions { get { throw null; } } + public string Tier { get { throw null; } } + } public partial class AzureFileVolume : Azure.ResourceManager.AppPlatform.Models.CustomPersistentDiskProperties { public AzureFileVolume(string mountPath, string shareName) : base (default(string)) { } @@ -1102,7 +1113,7 @@ public BindingResourceProperties() { } public static Azure.ResourceManager.AppPlatform.Models.BindingType AppDynamics { get { throw null; } } public static Azure.ResourceManager.AppPlatform.Models.BindingType ApplicationInsights { get { throw null; } } public static Azure.ResourceManager.AppPlatform.Models.BindingType Dynatrace { get { throw null; } } - public static Azure.ResourceManager.AppPlatform.Models.BindingType ElasticAPM { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.BindingType ElasticApm { get { throw null; } } public static Azure.ResourceManager.AppPlatform.Models.BindingType NewRelic { get { throw null; } } public bool Equals(Azure.ResourceManager.AppPlatform.Models.BindingType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -1257,19 +1268,6 @@ public CertificateProperties() { } public string SubjectName { get { throw null; } } public string Thumbprint { get { throw null; } } } - public partial class CheckNameAvailabilityContent - { - public CheckNameAvailabilityContent(string resourceType, string name) { } - public string Name { get { throw null; } } - public string ResourceType { get { throw null; } } - } - public partial class CheckNameAvailabilityResult - { - internal CheckNameAvailabilityResult() { } - public string Message { get { throw null; } } - public bool? NameAvailable { get { throw null; } } - public string Reason { get { throw null; } } - } public partial class ClusterResourceProperties { public ClusterResourceProperties() { } @@ -1704,9 +1702,9 @@ public LoadedCertificate(Azure.Core.ResourceIdentifier resourceId) { } public bool? LoadTrustStore { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } } - public partial class LogFileUrlResponse + public partial class LogFileUriResponse { - internal LogFileUrlResponse() { } + internal LogFileUriResponse() { } public System.Uri Uri { get { throw null; } } } public partial class MonitoringSettingProperties @@ -1828,17 +1826,6 @@ public ResourceRequests() { } public string Cpu { get { throw null; } set { } } public string Memory { get { throw null; } set { } } } - public partial class ResourceSku - { - internal ResourceSku() { } - public Azure.ResourceManager.AppPlatform.Models.SkuCapacity Capacity { get { throw null; } } - public System.Collections.Generic.IReadOnlyList LocationInfo { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Locations { get { throw null; } } - public string Name { get { throw null; } } - public Azure.Core.ResourceType? ResourceType { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Restrictions { get { throw null; } } - public string Tier { get { throw null; } } - } public partial class ResourceSkuCapabilities { internal ResourceSkuCapabilities() { } @@ -1855,7 +1842,7 @@ internal ResourceSkuLocationInfo() { } public partial class ResourceSkuRestrictionInfo { internal ResourceSkuRestrictionInfo() { } - public System.Collections.Generic.IReadOnlyList Locations { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Locations { get { throw null; } } public System.Collections.Generic.IReadOnlyList Zones { get { throw null; } } } public partial class ResourceSkuRestrictions @@ -1914,6 +1901,19 @@ internal ResourceUploadDefinition() { } public string RelativePath { get { throw null; } } public System.Uri UploadUri { get { throw null; } } } + public partial class ServiceNameAvailabilityContent + { + public ServiceNameAvailabilityContent(string resourceType, string name) { } + public string Name { get { throw null; } } + public string ResourceType { get { throw null; } } + } + public partial class ServiceNameAvailabilityResult + { + internal ServiceNameAvailabilityResult() { } + public string Message { get { throw null; } } + public bool? NameAvailable { get { throw null; } } + public string Reason { get { throw null; } } + } public partial class ServiceRegistryInstance { internal ServiceRegistryInstance() { } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalResource.cs index 9e1e4540ab2d4..9969008f7fc42 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalResource.cs @@ -21,7 +21,7 @@ namespace Azure.ResourceManager.AppPlatform /// A Class representing an ApiPortalResource 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 GetApiPortalResource method. - /// Otherwise you can get one from its parent resource using the GetApiPortalResource method. + /// Otherwise you can get one from its parent resource using the GetApiPortalResource method. /// public partial class ApiPortalResource : ArmResource { diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalResourceCollection.cs index 24de5a3e25f48..f41d2efc732e9 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ApiPortalResourceCollection.cs @@ -21,8 +21,8 @@ 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 GetApiPortalResources method from an instance of . + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetApiPortalResources method from an instance of . /// public partial class ApiPortalResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable { @@ -49,8 +49,8 @@ internal ApiPortalResourceCollection(ArmClient client, ResourceIdentifier id) : internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != ServiceResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ServiceResource.ResourceType), nameof(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)); } /// diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceCollection.cs index 1ccc089e01d79..5c8f6050f9e2a 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceCollection.cs @@ -21,8 +21,8 @@ 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 GetAppBuildServices method from an instance of . + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetAppBuildServices method from an instance of . /// public partial class AppBuildServiceCollection : ArmCollection, IEnumerable, IAsyncEnumerable { @@ -49,8 +49,8 @@ internal AppBuildServiceCollection(ArmClient client, ResourceIdentifier id) : ba internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != ServiceResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ServiceResource.ResourceType), nameof(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)); } /// diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceResource.cs index 0bbbb5a8d32da..cd15ad6c03204 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceResource.cs @@ -21,7 +21,7 @@ namespace Azure.ResourceManager.AppPlatform /// A Class representing an AppBuildService 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 GetAppBuildServiceResource method. - /// Otherwise you can get one from its parent resource using the GetAppBuildService method. + /// Otherwise you can get one from its parent resource using the GetAppBuildService method. /// public partial class AppBuildServiceResource : ArmResource { @@ -326,13 +326,13 @@ public virtual Response Get(CancellationToken cancellat /// Operation Id: BuildService_GetResourceUploadUrl /// /// The cancellation token to use. - public virtual async Task> GetResourceUploadUrlAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetResourceUploadUriAsync(CancellationToken cancellationToken = default) { - using var scope = _appBuildServiceBuildServiceClientDiagnostics.CreateScope("AppBuildServiceResource.GetResourceUploadUrl"); + using var scope = _appBuildServiceBuildServiceClientDiagnostics.CreateScope("AppBuildServiceResource.GetResourceUploadUri"); scope.Start(); try { - var response = await _appBuildServiceBuildServiceRestClient.GetResourceUploadUrlAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _appBuildServiceBuildServiceRestClient.GetResourceUploadUriAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -348,13 +348,13 @@ public virtual async Task> GetResourceUploadU /// Operation Id: BuildService_GetResourceUploadUrl /// /// The cancellation token to use. - public virtual Response GetResourceUploadUrl(CancellationToken cancellationToken = default) + public virtual Response GetResourceUploadUri(CancellationToken cancellationToken = default) { - using var scope = _appBuildServiceBuildServiceClientDiagnostics.CreateScope("AppBuildServiceResource.GetResourceUploadUrl"); + using var scope = _appBuildServiceBuildServiceClientDiagnostics.CreateScope("AppBuildServiceResource.GetResourceUploadUri"); scope.Start(); try { - var response = _appBuildServiceBuildServiceRestClient.GetResourceUploadUrl(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _appBuildServiceBuildServiceRestClient.GetResourceUploadUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); return response; } catch (Exception e) diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppDeploymentResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppDeploymentResource.cs index 9557600cd2812..8a4a48fc7ba6c 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppDeploymentResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppDeploymentResource.cs @@ -21,7 +21,7 @@ namespace Azure.ResourceManager.AppPlatform /// A Class representing an AppDeploymentResource 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 GetAppDeploymentResource method. - /// Otherwise you can get one from its parent resource using the GetAppDeploymentResource method. + /// Otherwise you can get one from its parent resource using the GetAppDeploymentResource method. /// public partial class AppDeploymentResource : ArmResource { @@ -409,13 +409,13 @@ public virtual ArmOperation Restart(WaitUntil waitUntil, CancellationToken cance /// Operation Id: Deployments_GetLogFileUrl /// /// The cancellation token to use. - public virtual async Task> GetLogFileUrlAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetLogFileUriAsync(CancellationToken cancellationToken = default) { - using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.GetLogFileUrl"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.GetLogFileUri"); scope.Start(); try { - var response = await _appDeploymentResourceDeploymentsRestClient.GetLogFileUrlAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _appDeploymentResourceDeploymentsRestClient.GetLogFileUriAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -431,13 +431,13 @@ public virtual async Task> GetLogFileUrlAsync(Cance /// Operation Id: Deployments_GetLogFileUrl /// /// The cancellation token to use. - public virtual Response GetLogFileUrl(CancellationToken cancellationToken = default) + public virtual Response GetLogFileUri(CancellationToken cancellationToken = default) { - using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.GetLogFileUrl"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.GetLogFileUri"); scope.Start(); try { - var response = _appDeploymentResourceDeploymentsRestClient.GetLogFileUrl(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var response = _appDeploymentResourceDeploymentsRestClient.GetLogFileUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -576,16 +576,16 @@ public virtual ArmOperation GenerateThreadDump(WaitUntil waitUntil, DiagnosticPa /// Parameters for the diagnostic operation. /// The cancellation token to use. /// is null. - public virtual async Task StartJFRAsync(WaitUntil waitUntil, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + public virtual async Task StartJfrAsync(WaitUntil waitUntil, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) { Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); - using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.StartJFR"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.StartJfr"); scope.Start(); try { - var response = await _appDeploymentResourceDeploymentsRestClient.StartJFRAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateStartJFRRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appDeploymentResourceDeploymentsRestClient.StartJfrAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateStartJfrRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -606,16 +606,16 @@ public virtual async Task StartJFRAsync(WaitUntil waitUntil, Diagn /// Parameters for the diagnostic operation. /// The cancellation token to use. /// is null. - public virtual ArmOperation StartJFR(WaitUntil waitUntil, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + public virtual ArmOperation StartJfr(WaitUntil waitUntil, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) { Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); - using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.StartJFR"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.StartJfr"); scope.Start(); try { - var response = _appDeploymentResourceDeploymentsRestClient.StartJFR(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken); - var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateStartJFRRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appDeploymentResourceDeploymentsRestClient.StartJfr(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken); + var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateStartJfrRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppDeploymentResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppDeploymentResourceCollection.cs index f1935a1edbda2..4767c4b86a9ad 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppDeploymentResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppDeploymentResourceCollection.cs @@ -21,8 +21,8 @@ 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 GetAppDeploymentResources method from an instance of . + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetAppDeploymentResources method from an instance of . /// public partial class AppDeploymentResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable { @@ -49,8 +49,8 @@ internal AppDeploymentResourceCollection(ArmClient client, ResourceIdentifier id internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != AppResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AppResource.ResourceType), nameof(id)); + if (id.ResourceType != AppPlatformAppResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AppPlatformAppResource.ResourceType), nameof(id)); } /// diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformAppResource.cs similarity index 70% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppResource.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformAppResource.cs index d03af0f015859..21d0245d0170d 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformAppResource.cs @@ -18,46 +18,46 @@ namespace Azure.ResourceManager.AppPlatform { /// - /// A Class representing an AppResource 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 GetAppResource method. - /// Otherwise you can get one from its parent resource using the GetAppResource method. + /// A Class representing an AppPlatformAppResource 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 GetAppPlatformAppResource method. + /// Otherwise you can get one from its parent resource using the GetAppPlatformAppResource method. /// - public partial class AppResource : ArmResource + public partial class AppPlatformAppResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string appName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _appResourceAppsClientDiagnostics; - private readonly AppsRestOperations _appResourceAppsRestClient; - private readonly AppResourceData _data; + private readonly ClientDiagnostics _appPlatformAppResourceAppsClientDiagnostics; + private readonly AppsRestOperations _appPlatformAppResourceAppsRestClient; + private readonly AppPlatformAppResourceData _data; - /// Initializes a new instance of the class for mocking. - protected AppResource() + /// Initializes a new instance of the class for mocking. + protected AppPlatformAppResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal AppResource(ArmClient client, AppResourceData data) : this(client, data.Id) + internal AppPlatformAppResource(ArmClient client, AppPlatformAppResourceData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// 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 AppResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal AppPlatformAppResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _appResourceAppsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string appResourceAppsApiVersion); - _appResourceAppsRestClient = new AppsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appResourceAppsApiVersion); + _appPlatformAppResourceAppsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string appPlatformAppResourceAppsApiVersion); + _appPlatformAppResourceAppsRestClient = new AppsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appPlatformAppResourceAppsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -71,7 +71,7 @@ internal AppResource(ArmClient client, ResourceIdentifier id) : base(client, id) /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual AppResourceData Data + public virtual AppPlatformAppResourceData Data { get { @@ -87,7 +87,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets a collection of BindingResources in the AppResource. + /// Gets a collection of BindingResources in the AppPlatformAppResource. /// An object representing collection of BindingResources and their operations over a BindingResource. public virtual BindingResourceCollection GetBindingResources() { @@ -124,11 +124,11 @@ public virtual Response GetBindingResource(string bindingName, return GetBindingResources().Get(bindingName, cancellationToken); } - /// Gets a collection of CustomDomainResources in the AppResource. - /// An object representing collection of CustomDomainResources and their operations over a CustomDomainResource. - public virtual CustomDomainResourceCollection GetCustomDomainResources() + /// Gets a collection of AppPlatformCustomDomainResources in the AppPlatformAppResource. + /// An object representing collection of AppPlatformCustomDomainResources and their operations over a AppPlatformCustomDomainResource. + public virtual AppPlatformCustomDomainResourceCollection GetAppPlatformCustomDomainResources() { - return GetCachedClient(Client => new CustomDomainResourceCollection(Client, Id)); + return GetCachedClient(Client => new AppPlatformCustomDomainResourceCollection(Client, Id)); } /// @@ -141,9 +141,9 @@ public virtual CustomDomainResourceCollection GetCustomDomainResources() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetCustomDomainResourceAsync(string domainName, CancellationToken cancellationToken = default) + public virtual async Task> GetAppPlatformCustomDomainResourceAsync(string domainName, CancellationToken cancellationToken = default) { - return await GetCustomDomainResources().GetAsync(domainName, cancellationToken).ConfigureAwait(false); + return await GetAppPlatformCustomDomainResources().GetAsync(domainName, cancellationToken).ConfigureAwait(false); } /// @@ -156,12 +156,12 @@ public virtual async Task> GetCustomDomainResourc /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetCustomDomainResource(string domainName, CancellationToken cancellationToken = default) + public virtual Response GetAppPlatformCustomDomainResource(string domainName, CancellationToken cancellationToken = default) { - return GetCustomDomainResources().Get(domainName, cancellationToken); + return GetAppPlatformCustomDomainResources().Get(domainName, cancellationToken); } - /// Gets a collection of AppDeploymentResources in the AppResource. + /// Gets a collection of AppDeploymentResources in the AppPlatformAppResource. /// An object representing collection of AppDeploymentResources and their operations over a AppDeploymentResource. public virtual AppDeploymentResourceCollection GetAppDeploymentResources() { @@ -205,16 +205,16 @@ public virtual Response GetAppDeploymentResource(string d /// /// Indicates whether sync status. /// The cancellation token to use. - public virtual async Task> GetAsync(string syncStatus = null, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string syncStatus = null, CancellationToken cancellationToken = default) { - using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResource.Get"); + using var scope = _appPlatformAppResourceAppsClientDiagnostics.CreateScope("AppPlatformAppResource.Get"); scope.Start(); try { - var response = await _appResourceAppsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, syncStatus, cancellationToken).ConfigureAwait(false); + var response = await _appPlatformAppResourceAppsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, syncStatus, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new AppResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppPlatformAppResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -230,16 +230,16 @@ public virtual async Task> GetAsync(string syncStatus = nu /// /// Indicates whether sync status. /// The cancellation token to use. - public virtual Response Get(string syncStatus = null, CancellationToken cancellationToken = default) + public virtual Response Get(string syncStatus = null, CancellationToken cancellationToken = default) { - using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResource.Get"); + using var scope = _appPlatformAppResourceAppsClientDiagnostics.CreateScope("AppPlatformAppResource.Get"); scope.Start(); try { - var response = _appResourceAppsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, syncStatus, cancellationToken); + var response = _appPlatformAppResourceAppsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, syncStatus, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new AppResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppPlatformAppResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -257,12 +257,12 @@ public virtual Response Get(string syncStatus = null, CancellationT /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResource.Delete"); + using var scope = _appPlatformAppResourceAppsClientDiagnostics.CreateScope("AppPlatformAppResource.Delete"); scope.Start(); try { - var response = await _appResourceAppsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(_appResourceAppsClientDiagnostics, Pipeline, _appResourceAppsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appPlatformAppResourceAppsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_appPlatformAppResourceAppsClientDiagnostics, Pipeline, _appPlatformAppResourceAppsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -283,12 +283,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResource.Delete"); + using var scope = _appPlatformAppResourceAppsClientDiagnostics.CreateScope("AppPlatformAppResource.Delete"); scope.Start(); try { - var response = _appResourceAppsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new AppPlatformArmOperation(_appResourceAppsClientDiagnostics, Pipeline, _appResourceAppsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appPlatformAppResourceAppsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_appPlatformAppResourceAppsClientDiagnostics, Pipeline, _appPlatformAppResourceAppsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -309,16 +309,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// Parameters for the update operation. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, AppResourceData data, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, AppPlatformAppResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResource.Update"); + using var scope = _appPlatformAppResourceAppsClientDiagnostics.CreateScope("AppPlatformAppResource.Update"); scope.Start(); try { - var response = await _appResourceAppsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(new AppResourceOperationSource(Client), _appResourceAppsClientDiagnostics, Pipeline, _appResourceAppsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appPlatformAppResourceAppsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new AppPlatformAppResourceOperationSource(Client), _appPlatformAppResourceAppsClientDiagnostics, Pipeline, _appPlatformAppResourceAppsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -339,16 +339,16 @@ public virtual async Task> UpdateAsync(WaitUntil waitU /// Parameters for the update operation. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, AppResourceData data, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, AppPlatformAppResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResource.Update"); + using var scope = _appPlatformAppResourceAppsClientDiagnostics.CreateScope("AppPlatformAppResource.Update"); scope.Start(); try { - var response = _appResourceAppsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new AppPlatformArmOperation(new AppResourceOperationSource(Client), _appResourceAppsClientDiagnostics, Pipeline, _appResourceAppsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appPlatformAppResourceAppsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new AppPlatformAppResourceOperationSource(Client), _appPlatformAppResourceAppsClientDiagnostics, Pipeline, _appPlatformAppResourceAppsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -366,13 +366,13 @@ public virtual ArmOperation Update(WaitUntil waitUntil, AppResource /// Operation Id: Apps_GetResourceUploadUrl /// /// The cancellation token to use. - public virtual async Task> GetResourceUploadUrlAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetResourceUploadUriAsync(CancellationToken cancellationToken = default) { - using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResource.GetResourceUploadUrl"); + using var scope = _appPlatformAppResourceAppsClientDiagnostics.CreateScope("AppPlatformAppResource.GetResourceUploadUri"); scope.Start(); try { - var response = await _appResourceAppsRestClient.GetResourceUploadUrlAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _appPlatformAppResourceAppsRestClient.GetResourceUploadUriAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -388,13 +388,13 @@ public virtual async Task> GetResourceUploadU /// Operation Id: Apps_GetResourceUploadUrl /// /// The cancellation token to use. - public virtual Response GetResourceUploadUrl(CancellationToken cancellationToken = default) + public virtual Response GetResourceUploadUri(CancellationToken cancellationToken = default) { - using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResource.GetResourceUploadUrl"); + using var scope = _appPlatformAppResourceAppsClientDiagnostics.CreateScope("AppPlatformAppResource.GetResourceUploadUri"); scope.Start(); try { - var response = _appResourceAppsRestClient.GetResourceUploadUrl(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _appPlatformAppResourceAppsRestClient.GetResourceUploadUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -413,16 +413,16 @@ public virtual Response GetResourceUploadUrl(Cancellat /// A list of Deployment name to be active. /// The cancellation token to use. /// is null. - public virtual async Task> SetActiveDeploymentsAsync(WaitUntil waitUntil, ActiveDeploymentList activeDeploymentCollection, CancellationToken cancellationToken = default) + public virtual async Task> SetActiveDeploymentsAsync(WaitUntil waitUntil, ActiveDeploymentList activeDeploymentCollection, CancellationToken cancellationToken = default) { Argument.AssertNotNull(activeDeploymentCollection, nameof(activeDeploymentCollection)); - using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResource.SetActiveDeployments"); + using var scope = _appPlatformAppResourceAppsClientDiagnostics.CreateScope("AppPlatformAppResource.SetActiveDeployments"); scope.Start(); try { - var response = await _appResourceAppsRestClient.SetActiveDeploymentsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, activeDeploymentCollection, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(new AppResourceOperationSource(Client), _appResourceAppsClientDiagnostics, Pipeline, _appResourceAppsRestClient.CreateSetActiveDeploymentsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, activeDeploymentCollection).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appPlatformAppResourceAppsRestClient.SetActiveDeploymentsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, activeDeploymentCollection, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new AppPlatformAppResourceOperationSource(Client), _appPlatformAppResourceAppsClientDiagnostics, Pipeline, _appPlatformAppResourceAppsRestClient.CreateSetActiveDeploymentsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, activeDeploymentCollection).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -443,16 +443,16 @@ public virtual async Task> SetActiveDeploymentsAsync(W /// A list of Deployment name to be active. /// The cancellation token to use. /// is null. - public virtual ArmOperation SetActiveDeployments(WaitUntil waitUntil, ActiveDeploymentList activeDeploymentCollection, CancellationToken cancellationToken = default) + public virtual ArmOperation SetActiveDeployments(WaitUntil waitUntil, ActiveDeploymentList activeDeploymentCollection, CancellationToken cancellationToken = default) { Argument.AssertNotNull(activeDeploymentCollection, nameof(activeDeploymentCollection)); - using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResource.SetActiveDeployments"); + using var scope = _appPlatformAppResourceAppsClientDiagnostics.CreateScope("AppPlatformAppResource.SetActiveDeployments"); scope.Start(); try { - var response = _appResourceAppsRestClient.SetActiveDeployments(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, activeDeploymentCollection, cancellationToken); - var operation = new AppPlatformArmOperation(new AppResourceOperationSource(Client), _appResourceAppsClientDiagnostics, Pipeline, _appResourceAppsRestClient.CreateSetActiveDeploymentsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, activeDeploymentCollection).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appPlatformAppResourceAppsRestClient.SetActiveDeployments(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, activeDeploymentCollection, cancellationToken); + var operation = new AppPlatformArmOperation(new AppPlatformAppResourceOperationSource(Client), _appPlatformAppResourceAppsClientDiagnostics, Pipeline, _appPlatformAppResourceAppsRestClient.CreateSetActiveDeploymentsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, activeDeploymentCollection).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -476,11 +476,11 @@ public virtual async Task> ValidateDomainAs { Argument.AssertNotNull(validatePayload, nameof(validatePayload)); - using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResource.ValidateDomain"); + using var scope = _appPlatformAppResourceAppsClientDiagnostics.CreateScope("AppPlatformAppResource.ValidateDomain"); scope.Start(); try { - var response = await _appResourceAppsRestClient.ValidateDomainAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, validatePayload, cancellationToken).ConfigureAwait(false); + var response = await _appPlatformAppResourceAppsRestClient.ValidateDomainAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, validatePayload, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -502,11 +502,11 @@ public virtual Response ValidateDomain(CustomDomainV { Argument.AssertNotNull(validatePayload, nameof(validatePayload)); - using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResource.ValidateDomain"); + using var scope = _appPlatformAppResourceAppsClientDiagnostics.CreateScope("AppPlatformAppResource.ValidateDomain"); scope.Start(); try { - var response = _appResourceAppsRestClient.ValidateDomain(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, validatePayload, cancellationToken); + var response = _appPlatformAppResourceAppsRestClient.ValidateDomain(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, validatePayload, cancellationToken); return response; } catch (Exception e) diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformAppResourceCollection.cs similarity index 60% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppResourceCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformAppResourceCollection.cs index ff10de98d06ce..1ed427f4f2ccd 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformAppResourceCollection.cs @@ -20,28 +20,28 @@ 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 GetAppResources method from an instance of . + /// 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 GetAppPlatformAppResources method from an instance of . /// - public partial class AppResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class AppPlatformAppResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _appResourceAppsClientDiagnostics; - private readonly AppsRestOperations _appResourceAppsRestClient; + private readonly ClientDiagnostics _appPlatformAppResourceAppsClientDiagnostics; + private readonly AppsRestOperations _appPlatformAppResourceAppsRestClient; - /// Initializes a new instance of the class for mocking. - protected AppResourceCollection() + /// Initializes a new instance of the class for mocking. + protected AppPlatformAppResourceCollection() { } - /// Initializes a new instance of the class. + /// 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 AppResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal AppPlatformAppResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _appResourceAppsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", AppResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(AppResource.ResourceType, out string appResourceAppsApiVersion); - _appResourceAppsRestClient = new AppsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appResourceAppsApiVersion); + _appPlatformAppResourceAppsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", AppPlatformAppResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AppPlatformAppResource.ResourceType, out string appPlatformAppResourceAppsApiVersion); + _appPlatformAppResourceAppsRestClient = new AppsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appPlatformAppResourceAppsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -49,8 +49,8 @@ internal AppResourceCollection(ArmClient client, ResourceIdentifier id) : base(c internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != ServiceResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ServiceResource.ResourceType), nameof(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)); } /// @@ -64,17 +64,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// 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 appName, AppResourceData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string appName, AppPlatformAppResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(appName, nameof(appName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResourceCollection.CreateOrUpdate"); + using var scope = _appPlatformAppResourceAppsClientDiagnostics.CreateScope("AppPlatformAppResourceCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _appResourceAppsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appName, data, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(new AppResourceOperationSource(Client), _appResourceAppsClientDiagnostics, Pipeline, _appResourceAppsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appPlatformAppResourceAppsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new AppPlatformAppResourceOperationSource(Client), _appPlatformAppResourceAppsClientDiagnostics, Pipeline, _appPlatformAppResourceAppsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -97,17 +97,17 @@ public virtual async Task> CreateOrUpdateAsync(WaitUnt /// 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 appName, AppResourceData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string appName, AppPlatformAppResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(appName, nameof(appName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResourceCollection.CreateOrUpdate"); + using var scope = _appPlatformAppResourceAppsClientDiagnostics.CreateScope("AppPlatformAppResourceCollection.CreateOrUpdate"); scope.Start(); try { - var response = _appResourceAppsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appName, data, cancellationToken); - var operation = new AppPlatformArmOperation(new AppResourceOperationSource(Client), _appResourceAppsClientDiagnostics, Pipeline, _appResourceAppsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appPlatformAppResourceAppsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new AppPlatformAppResourceOperationSource(Client), _appPlatformAppResourceAppsClientDiagnostics, Pipeline, _appPlatformAppResourceAppsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -129,18 +129,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, str /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string appName, string syncStatus = null, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string appName, string syncStatus = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(appName, nameof(appName)); - using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResourceCollection.Get"); + using var scope = _appPlatformAppResourceAppsClientDiagnostics.CreateScope("AppPlatformAppResourceCollection.Get"); scope.Start(); try { - var response = await _appResourceAppsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appName, syncStatus, cancellationToken).ConfigureAwait(false); + var response = await _appPlatformAppResourceAppsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appName, syncStatus, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new AppResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppPlatformAppResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -159,18 +159,18 @@ public virtual async Task> GetAsync(string appName, string /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string appName, string syncStatus = null, CancellationToken cancellationToken = default) + public virtual Response Get(string appName, string syncStatus = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(appName, nameof(appName)); - using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResourceCollection.Get"); + using var scope = _appPlatformAppResourceAppsClientDiagnostics.CreateScope("AppPlatformAppResourceCollection.Get"); scope.Start(); try { - var response = _appResourceAppsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appName, syncStatus, cancellationToken); + var response = _appPlatformAppResourceAppsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appName, syncStatus, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new AppResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppPlatformAppResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -185,17 +185,17 @@ public virtual Response Get(string appName, string syncStatus = nul /// Operation Id: Apps_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) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { - using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResourceCollection.GetAll"); + using var scope = _appPlatformAppResourceAppsClientDiagnostics.CreateScope("AppPlatformAppResourceCollection.GetAll"); scope.Start(); try { - var response = await _appResourceAppsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new AppResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = await _appPlatformAppResourceAppsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new AppPlatformAppResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -203,14 +203,14 @@ async Task> FirstPageFunc(int? pageSizeHint) throw; } } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) + async Task> NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResourceCollection.GetAll"); + using var scope = _appPlatformAppResourceAppsClientDiagnostics.CreateScope("AppPlatformAppResourceCollection.GetAll"); scope.Start(); try { - var response = await _appResourceAppsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new AppResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = await _appPlatformAppResourceAppsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new AppPlatformAppResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -227,17 +227,17 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint) /// Operation Id: Apps_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) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { - using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResourceCollection.GetAll"); + using var scope = _appPlatformAppResourceAppsClientDiagnostics.CreateScope("AppPlatformAppResourceCollection.GetAll"); scope.Start(); try { - var response = _appResourceAppsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new AppResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = _appPlatformAppResourceAppsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AppPlatformAppResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -245,14 +245,14 @@ Page FirstPageFunc(int? pageSizeHint) throw; } } - Page NextPageFunc(string nextLink, int? pageSizeHint) + Page NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResourceCollection.GetAll"); + using var scope = _appPlatformAppResourceAppsClientDiagnostics.CreateScope("AppPlatformAppResourceCollection.GetAll"); scope.Start(); try { - var response = _appResourceAppsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new AppResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = _appPlatformAppResourceAppsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AppPlatformAppResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -277,11 +277,11 @@ public virtual async Task> ExistsAsync(string appName, string syn { Argument.AssertNotNullOrEmpty(appName, nameof(appName)); - using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResourceCollection.Exists"); + using var scope = _appPlatformAppResourceAppsClientDiagnostics.CreateScope("AppPlatformAppResourceCollection.Exists"); scope.Start(); try { - var response = await _appResourceAppsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appName, syncStatus, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _appPlatformAppResourceAppsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appName, syncStatus, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -305,11 +305,11 @@ public virtual Response Exists(string appName, string syncStatus = null, C { Argument.AssertNotNullOrEmpty(appName, nameof(appName)); - using var scope = _appResourceAppsClientDiagnostics.CreateScope("AppResourceCollection.Exists"); + using var scope = _appPlatformAppResourceAppsClientDiagnostics.CreateScope("AppPlatformAppResourceCollection.Exists"); scope.Start(); try { - var response = _appResourceAppsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appName, syncStatus, cancellationToken: cancellationToken); + var response = _appPlatformAppResourceAppsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appName, syncStatus, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -319,7 +319,7 @@ public virtual Response Exists(string appName, string syncStatus = null, C } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -329,7 +329,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformAppResourceData.cs similarity index 68% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppResourceData.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformAppResourceData.cs index 74adb56884ae9..c691a5db9aebb 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppResourceData.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformAppResourceData.cs @@ -11,15 +11,15 @@ namespace Azure.ResourceManager.AppPlatform { - /// A class representing the AppResource data model. - public partial class AppResourceData : ResourceData + /// A class representing the AppPlatformAppResource data model. + public partial class AppPlatformAppResourceData : ResourceData { - /// Initializes a new instance of AppResourceData. - public AppResourceData() + /// Initializes a new instance of AppPlatformAppResourceData. + public AppPlatformAppResourceData() { } - /// Initializes a new instance of AppResourceData. + /// Initializes a new instance of AppPlatformAppResourceData. /// The id. /// The name. /// The resourceType. @@ -27,7 +27,7 @@ public AppResourceData() /// Properties of the App resource. /// The Managed Identity type of the app resource. /// The GEO location of the application, always the same with its parent resource. - internal AppResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AppResourceProperties properties, ManagedServiceIdentity identity, AzureLocation? location) : base(id, name, resourceType, systemData) + internal AppPlatformAppResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AppResourceProperties properties, ManagedServiceIdentity identity, AzureLocation? location) : base(id, name, resourceType, systemData) { Properties = properties; Identity = identity; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomDomainResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformCustomDomainResource.cs similarity index 62% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomDomainResource.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformCustomDomainResource.cs index a994550f26ff3..8ed0ff8b875d3 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomDomainResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformCustomDomainResource.cs @@ -17,46 +17,46 @@ namespace Azure.ResourceManager.AppPlatform { /// - /// A Class representing a CustomDomainResource 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 GetCustomDomainResource method. - /// Otherwise you can get one from its parent resource using the GetCustomDomainResource method. + /// A Class representing an AppPlatformCustomDomainResource 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 GetAppPlatformCustomDomainResource method. + /// Otherwise you can get one from its parent resource using the GetAppPlatformCustomDomainResource method. /// - public partial class CustomDomainResource : ArmResource + public partial class AppPlatformCustomDomainResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string appName, string domainName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _customDomainResourceCustomDomainsClientDiagnostics; - private readonly CustomDomainsRestOperations _customDomainResourceCustomDomainsRestClient; - private readonly CustomDomainResourceData _data; + private readonly ClientDiagnostics _appPlatformCustomDomainResourceCustomDomainsClientDiagnostics; + private readonly CustomDomainsRestOperations _appPlatformCustomDomainResourceCustomDomainsRestClient; + private readonly AppPlatformCustomDomainResourceData _data; - /// Initializes a new instance of the class for mocking. - protected CustomDomainResource() + /// Initializes a new instance of the class for mocking. + protected AppPlatformCustomDomainResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal CustomDomainResource(ArmClient client, CustomDomainResourceData data) : this(client, data.Id) + internal AppPlatformCustomDomainResource(ArmClient client, AppPlatformCustomDomainResourceData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// 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 CustomDomainResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal AppPlatformCustomDomainResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _customDomainResourceCustomDomainsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string customDomainResourceCustomDomainsApiVersion); - _customDomainResourceCustomDomainsRestClient = new CustomDomainsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, customDomainResourceCustomDomainsApiVersion); + _appPlatformCustomDomainResourceCustomDomainsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string appPlatformCustomDomainResourceCustomDomainsApiVersion); + _appPlatformCustomDomainResourceCustomDomainsRestClient = new CustomDomainsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appPlatformCustomDomainResourceCustomDomainsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -70,7 +70,7 @@ internal CustomDomainResource(ArmClient client, ResourceIdentifier id) : base(cl /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual CustomDomainResourceData Data + public virtual AppPlatformCustomDomainResourceData Data { get { @@ -92,16 +92,16 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// Operation Id: CustomDomains_Get /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResource.Get"); + using var scope = _appPlatformCustomDomainResourceCustomDomainsClientDiagnostics.CreateScope("AppPlatformCustomDomainResource.Get"); scope.Start(); try { - var response = await _customDomainResourceCustomDomainsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _appPlatformCustomDomainResourceCustomDomainsRestClient.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 CustomDomainResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppPlatformCustomDomainResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -116,16 +116,16 @@ public virtual async Task> GetAsync(CancellationT /// Operation Id: CustomDomains_Get /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResource.Get"); + using var scope = _appPlatformCustomDomainResourceCustomDomainsClientDiagnostics.CreateScope("AppPlatformCustomDomainResource.Get"); scope.Start(); try { - var response = _customDomainResourceCustomDomainsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var response = _appPlatformCustomDomainResourceCustomDomainsRestClient.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 CustomDomainResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppPlatformCustomDomainResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -143,12 +143,12 @@ public virtual Response Get(CancellationToken cancellation /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResource.Delete"); + using var scope = _appPlatformCustomDomainResourceCustomDomainsClientDiagnostics.CreateScope("AppPlatformCustomDomainResource.Delete"); scope.Start(); try { - var response = await _customDomainResourceCustomDomainsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(_customDomainResourceCustomDomainsClientDiagnostics, Pipeline, _customDomainResourceCustomDomainsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appPlatformCustomDomainResourceCustomDomainsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_appPlatformCustomDomainResourceCustomDomainsClientDiagnostics, Pipeline, _appPlatformCustomDomainResourceCustomDomainsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -169,12 +169,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResource.Delete"); + using var scope = _appPlatformCustomDomainResourceCustomDomainsClientDiagnostics.CreateScope("AppPlatformCustomDomainResource.Delete"); scope.Start(); try { - var response = _customDomainResourceCustomDomainsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new AppPlatformArmOperation(_customDomainResourceCustomDomainsClientDiagnostics, Pipeline, _customDomainResourceCustomDomainsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appPlatformCustomDomainResourceCustomDomainsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_appPlatformCustomDomainResourceCustomDomainsClientDiagnostics, Pipeline, _appPlatformCustomDomainResourceCustomDomainsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -195,16 +195,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// Parameters for the create or update operation. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, CustomDomainResourceData data, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, AppPlatformCustomDomainResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResource.Update"); + using var scope = _appPlatformCustomDomainResourceCustomDomainsClientDiagnostics.CreateScope("AppPlatformCustomDomainResource.Update"); scope.Start(); try { - var response = await _customDomainResourceCustomDomainsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(new CustomDomainResourceOperationSource(Client), _customDomainResourceCustomDomainsClientDiagnostics, Pipeline, _customDomainResourceCustomDomainsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appPlatformCustomDomainResourceCustomDomainsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new AppPlatformCustomDomainResourceOperationSource(Client), _appPlatformCustomDomainResourceCustomDomainsClientDiagnostics, Pipeline, _appPlatformCustomDomainResourceCustomDomainsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -225,16 +225,16 @@ public virtual async Task> UpdateAsync(WaitUn /// Parameters for the create or update operation. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, CustomDomainResourceData data, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, AppPlatformCustomDomainResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResource.Update"); + using var scope = _appPlatformCustomDomainResourceCustomDomainsClientDiagnostics.CreateScope("AppPlatformCustomDomainResource.Update"); scope.Start(); try { - var response = _customDomainResourceCustomDomainsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new AppPlatformArmOperation(new CustomDomainResourceOperationSource(Client), _customDomainResourceCustomDomainsClientDiagnostics, Pipeline, _customDomainResourceCustomDomainsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appPlatformCustomDomainResourceCustomDomainsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new AppPlatformCustomDomainResourceOperationSource(Client), _appPlatformCustomDomainResourceCustomDomainsClientDiagnostics, Pipeline, _appPlatformCustomDomainResourceCustomDomainsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomDomainResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformCustomDomainResourceCollection.cs similarity index 58% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomDomainResourceCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformCustomDomainResourceCollection.cs index fb1cfae3ca473..4ade08a27e904 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomDomainResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformCustomDomainResourceCollection.cs @@ -20,28 +20,28 @@ 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 GetCustomDomainResources method from an instance of . + /// 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 GetAppPlatformCustomDomainResources method from an instance of . /// - public partial class CustomDomainResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class AppPlatformCustomDomainResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _customDomainResourceCustomDomainsClientDiagnostics; - private readonly CustomDomainsRestOperations _customDomainResourceCustomDomainsRestClient; + private readonly ClientDiagnostics _appPlatformCustomDomainResourceCustomDomainsClientDiagnostics; + private readonly CustomDomainsRestOperations _appPlatformCustomDomainResourceCustomDomainsRestClient; - /// Initializes a new instance of the class for mocking. - protected CustomDomainResourceCollection() + /// Initializes a new instance of the class for mocking. + protected AppPlatformCustomDomainResourceCollection() { } - /// Initializes a new instance of the class. + /// 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 CustomDomainResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal AppPlatformCustomDomainResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _customDomainResourceCustomDomainsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", CustomDomainResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(CustomDomainResource.ResourceType, out string customDomainResourceCustomDomainsApiVersion); - _customDomainResourceCustomDomainsRestClient = new CustomDomainsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, customDomainResourceCustomDomainsApiVersion); + _appPlatformCustomDomainResourceCustomDomainsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", AppPlatformCustomDomainResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AppPlatformCustomDomainResource.ResourceType, out string appPlatformCustomDomainResourceCustomDomainsApiVersion); + _appPlatformCustomDomainResourceCustomDomainsRestClient = new CustomDomainsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appPlatformCustomDomainResourceCustomDomainsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -49,8 +49,8 @@ internal CustomDomainResourceCollection(ArmClient client, ResourceIdentifier id) internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != AppResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AppResource.ResourceType), nameof(id)); + if (id.ResourceType != AppPlatformAppResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AppPlatformAppResource.ResourceType), nameof(id)); } /// @@ -64,17 +64,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// 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 domainName, CustomDomainResourceData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string domainName, AppPlatformCustomDomainResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResourceCollection.CreateOrUpdate"); + using var scope = _appPlatformCustomDomainResourceCustomDomainsClientDiagnostics.CreateScope("AppPlatformCustomDomainResourceCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _customDomainResourceCustomDomainsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, data, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(new CustomDomainResourceOperationSource(Client), _customDomainResourceCustomDomainsClientDiagnostics, Pipeline, _customDomainResourceCustomDomainsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appPlatformCustomDomainResourceCustomDomainsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new AppPlatformCustomDomainResourceOperationSource(Client), _appPlatformCustomDomainResourceCustomDomainsClientDiagnostics, Pipeline, _appPlatformCustomDomainResourceCustomDomainsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -97,17 +97,17 @@ public virtual async Task> CreateOrUpdateAsyn /// 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 domainName, CustomDomainResourceData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string domainName, AppPlatformCustomDomainResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResourceCollection.CreateOrUpdate"); + using var scope = _appPlatformCustomDomainResourceCustomDomainsClientDiagnostics.CreateScope("AppPlatformCustomDomainResourceCollection.CreateOrUpdate"); scope.Start(); try { - var response = _customDomainResourceCustomDomainsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, data, cancellationToken); - var operation = new AppPlatformArmOperation(new CustomDomainResourceOperationSource(Client), _customDomainResourceCustomDomainsClientDiagnostics, Pipeline, _customDomainResourceCustomDomainsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appPlatformCustomDomainResourceCustomDomainsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new AppPlatformCustomDomainResourceOperationSource(Client), _appPlatformCustomDomainResourceCustomDomainsClientDiagnostics, Pipeline, _appPlatformCustomDomainResourceCustomDomainsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -128,18 +128,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string domainName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string domainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); - using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResourceCollection.Get"); + using var scope = _appPlatformCustomDomainResourceCustomDomainsClientDiagnostics.CreateScope("AppPlatformCustomDomainResourceCollection.Get"); scope.Start(); try { - var response = await _customDomainResourceCustomDomainsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, cancellationToken).ConfigureAwait(false); + var response = await _appPlatformCustomDomainResourceCustomDomainsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CustomDomainResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppPlatformCustomDomainResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -157,18 +157,18 @@ public virtual async Task> GetAsync(string domain /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string domainName, CancellationToken cancellationToken = default) + public virtual Response Get(string domainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); - using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResourceCollection.Get"); + using var scope = _appPlatformCustomDomainResourceCustomDomainsClientDiagnostics.CreateScope("AppPlatformCustomDomainResourceCollection.Get"); scope.Start(); try { - var response = _customDomainResourceCustomDomainsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, cancellationToken); + var response = _appPlatformCustomDomainResourceCustomDomainsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CustomDomainResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppPlatformCustomDomainResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -183,17 +183,17 @@ public virtual Response Get(string domainName, Cancellatio /// Operation Id: CustomDomains_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) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { - using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResourceCollection.GetAll"); + using var scope = _appPlatformCustomDomainResourceCustomDomainsClientDiagnostics.CreateScope("AppPlatformCustomDomainResourceCollection.GetAll"); scope.Start(); try { - var response = await _customDomainResourceCustomDomainsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new CustomDomainResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = await _appPlatformCustomDomainResourceCustomDomainsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new AppPlatformCustomDomainResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -201,14 +201,14 @@ async Task> FirstPageFunc(int? pageSizeHint) throw; } } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) + async Task> NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResourceCollection.GetAll"); + using var scope = _appPlatformCustomDomainResourceCustomDomainsClientDiagnostics.CreateScope("AppPlatformCustomDomainResourceCollection.GetAll"); scope.Start(); try { - var response = await _customDomainResourceCustomDomainsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new CustomDomainResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = await _appPlatformCustomDomainResourceCustomDomainsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new AppPlatformCustomDomainResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -225,17 +225,17 @@ async Task> NextPageFunc(string nextLink, int? pageSi /// Operation Id: CustomDomains_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) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { - using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResourceCollection.GetAll"); + using var scope = _appPlatformCustomDomainResourceCustomDomainsClientDiagnostics.CreateScope("AppPlatformCustomDomainResourceCollection.GetAll"); scope.Start(); try { - var response = _customDomainResourceCustomDomainsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new CustomDomainResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = _appPlatformCustomDomainResourceCustomDomainsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AppPlatformCustomDomainResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -243,14 +243,14 @@ Page FirstPageFunc(int? pageSizeHint) throw; } } - Page NextPageFunc(string nextLink, int? pageSizeHint) + Page NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResourceCollection.GetAll"); + using var scope = _appPlatformCustomDomainResourceCustomDomainsClientDiagnostics.CreateScope("AppPlatformCustomDomainResourceCollection.GetAll"); scope.Start(); try { - var response = _customDomainResourceCustomDomainsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new CustomDomainResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = _appPlatformCustomDomainResourceCustomDomainsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AppPlatformCustomDomainResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -274,11 +274,11 @@ public virtual async Task> ExistsAsync(string domainName, Cancell { Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); - using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResourceCollection.Exists"); + using var scope = _appPlatformCustomDomainResourceCustomDomainsClientDiagnostics.CreateScope("AppPlatformCustomDomainResourceCollection.Exists"); scope.Start(); try { - var response = await _customDomainResourceCustomDomainsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _appPlatformCustomDomainResourceCustomDomainsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -301,11 +301,11 @@ public virtual Response Exists(string domainName, CancellationToken cancel { Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); - using var scope = _customDomainResourceCustomDomainsClientDiagnostics.CreateScope("CustomDomainResourceCollection.Exists"); + using var scope = _appPlatformCustomDomainResourceCustomDomainsClientDiagnostics.CreateScope("AppPlatformCustomDomainResourceCollection.Exists"); scope.Start(); try { - var response = _customDomainResourceCustomDomainsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, cancellationToken: cancellationToken); + var response = _appPlatformCustomDomainResourceCustomDomainsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, domainName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -315,7 +315,7 @@ public virtual Response Exists(string domainName, CancellationToken cancel } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -325,7 +325,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomDomainResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformCustomDomainResourceData.cs similarity index 56% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomDomainResourceData.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformCustomDomainResourceData.cs index f806895daa6a4..13a665195732c 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CustomDomainResourceData.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformCustomDomainResourceData.cs @@ -11,21 +11,21 @@ namespace Azure.ResourceManager.AppPlatform { - /// A class representing the CustomDomainResource data model. - public partial class CustomDomainResourceData : ResourceData + /// A class representing the AppPlatformCustomDomainResource data model. + public partial class AppPlatformCustomDomainResourceData : ResourceData { - /// Initializes a new instance of CustomDomainResourceData. - public CustomDomainResourceData() + /// Initializes a new instance of AppPlatformCustomDomainResourceData. + public AppPlatformCustomDomainResourceData() { } - /// Initializes a new instance of CustomDomainResourceData. + /// Initializes a new instance of AppPlatformCustomDomainResourceData. /// The id. /// The name. /// The resourceType. /// The systemData. /// Properties of the custom domain resource. - internal CustomDomainResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, CustomDomainProperties properties) : base(id, name, resourceType, systemData) + internal AppPlatformCustomDomainResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, CustomDomainProperties properties) : base(id, name, resourceType, systemData) { Properties = properties; } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformServiceResource.cs similarity index 79% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceResource.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformServiceResource.cs index b30c4d4ee9286..2c6d4b4320363 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformServiceResource.cs @@ -21,50 +21,50 @@ namespace Azure.ResourceManager.AppPlatform { /// - /// A Class representing a ServiceResource 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 GetServiceResource method. - /// Otherwise you can get one from its parent resource using the GetServiceResource method. + /// A Class representing an AppPlatformServiceResource 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 GetAppPlatformServiceResource method. + /// Otherwise you can get one from its parent resource using the GetAppPlatformServiceResource method. /// - public partial class ServiceResource : ArmResource + public partial class AppPlatformServiceResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _serviceResourceServicesClientDiagnostics; - private readonly ServicesRestOperations _serviceResourceServicesRestClient; + private readonly ClientDiagnostics _appPlatformServiceResourceServicesClientDiagnostics; + private readonly ServicesRestOperations _appPlatformServiceResourceServicesRestClient; private readonly ClientDiagnostics _configServerResourceConfigServersClientDiagnostics; private readonly ConfigServersRestOperations _configServerResourceConfigServersRestClient; private readonly ClientDiagnostics _appDeploymentResourceDeploymentsClientDiagnostics; private readonly DeploymentsRestOperations _appDeploymentResourceDeploymentsRestClient; - private readonly ServiceResourceData _data; + private readonly AppPlatformServiceResourceData _data; - /// Initializes a new instance of the class for mocking. - protected ServiceResource() + /// Initializes a new instance of the class for mocking. + protected AppPlatformServiceResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal ServiceResource(ArmClient client, ServiceResourceData data) : this(client, data.Id) + internal AppPlatformServiceResource(ArmClient client, AppPlatformServiceResourceData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// 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 ServiceResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal AppPlatformServiceResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _serviceResourceServicesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string serviceResourceServicesApiVersion); - _serviceResourceServicesRestClient = new ServicesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceResourceServicesApiVersion); + _appPlatformServiceResourceServicesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string appPlatformServiceResourceServicesApiVersion); + _appPlatformServiceResourceServicesRestClient = new ServicesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appPlatformServiceResourceServicesApiVersion); _configServerResourceConfigServersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ConfigServerResource.ResourceType.Namespace, Diagnostics); TryGetApiVersion(ConfigServerResource.ResourceType, out string configServerResourceConfigServersApiVersion); _configServerResourceConfigServersRestClient = new ConfigServersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, configServerResourceConfigServersApiVersion); @@ -84,7 +84,7 @@ internal ServiceResource(ArmClient client, ResourceIdentifier id) : base(client, /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual ServiceResourceData Data + public virtual AppPlatformServiceResourceData Data { get { @@ -100,14 +100,14 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets an object representing a ConfigServerResource along with the instance operations that can be performed on it in the ServiceResource. + /// Gets an object representing a ConfigServerResource along with the instance operations that can be performed on it in the AppPlatformServiceResource. /// Returns a object. public virtual ConfigServerResource GetConfigServerResource() { return new ConfigServerResource(Client, new ResourceIdentifier(Id.ToString() + "/configServers/default")); } - /// Gets a collection of ConfigurationServiceResources in the ServiceResource. + /// Gets a collection of ConfigurationServiceResources in the AppPlatformServiceResource. /// An object representing collection of ConfigurationServiceResources and their operations over a ConfigurationServiceResource. public virtual ConfigurationServiceResourceCollection GetConfigurationServiceResources() { @@ -144,7 +144,7 @@ public virtual Response GetConfigurationServiceRes return GetConfigurationServiceResources().Get(configurationServiceName, cancellationToken); } - /// Gets a collection of ServiceRegistryResources in the ServiceResource. + /// Gets a collection of ServiceRegistryResources in the AppPlatformServiceResource. /// An object representing collection of ServiceRegistryResources and their operations over a ServiceRegistryResource. public virtual ServiceRegistryResourceCollection GetServiceRegistryResources() { @@ -181,7 +181,7 @@ public virtual Response GetServiceRegistryResource(stri return GetServiceRegistryResources().Get(serviceRegistryName, cancellationToken); } - /// Gets a collection of AppBuildServiceResources in the ServiceResource. + /// Gets a collection of AppBuildServiceResources in the AppPlatformServiceResource. /// An object representing collection of AppBuildServiceResources and their operations over a AppBuildServiceResource. public virtual AppBuildServiceCollection GetAppBuildServices() { @@ -218,18 +218,18 @@ public virtual Response GetAppBuildService(string build return GetAppBuildServices().Get(buildServiceName, cancellationToken); } - /// Gets an object representing a MonitoringSettingResource along with the instance operations that can be performed on it in the ServiceResource. + /// Gets an object representing a MonitoringSettingResource along with the instance operations that can be performed on it in the AppPlatformServiceResource. /// Returns a object. public virtual MonitoringSettingResource GetMonitoringSettingResource() { return new MonitoringSettingResource(Client, new ResourceIdentifier(Id.ToString() + "/monitoringSettings/default")); } - /// Gets a collection of AppResources in the ServiceResource. - /// An object representing collection of AppResources and their operations over a AppResource. - public virtual AppResourceCollection GetAppResources() + /// Gets a collection of AppPlatformAppResources in the AppPlatformServiceResource. + /// An object representing collection of AppPlatformAppResources and their operations over a AppPlatformAppResource. + public virtual AppPlatformAppResourceCollection GetAppPlatformAppResources() { - return GetCachedClient(Client => new AppResourceCollection(Client, Id)); + return GetCachedClient(Client => new AppPlatformAppResourceCollection(Client, Id)); } /// @@ -243,9 +243,9 @@ public virtual AppResourceCollection GetAppResources() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetAppResourceAsync(string appName, string syncStatus = null, CancellationToken cancellationToken = default) + public virtual async Task> GetAppPlatformAppResourceAsync(string appName, string syncStatus = null, CancellationToken cancellationToken = default) { - return await GetAppResources().GetAsync(appName, syncStatus, cancellationToken).ConfigureAwait(false); + return await GetAppPlatformAppResources().GetAsync(appName, syncStatus, cancellationToken).ConfigureAwait(false); } /// @@ -259,12 +259,12 @@ public virtual async Task> GetAppResourceAsync(string appN /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetAppResource(string appName, string syncStatus = null, CancellationToken cancellationToken = default) + public virtual Response GetAppPlatformAppResource(string appName, string syncStatus = null, CancellationToken cancellationToken = default) { - return GetAppResources().Get(appName, syncStatus, cancellationToken); + return GetAppPlatformAppResources().Get(appName, syncStatus, cancellationToken); } - /// Gets a collection of StorageResources in the ServiceResource. + /// Gets a collection of StorageResources in the AppPlatformServiceResource. /// An object representing collection of StorageResources and their operations over a StorageResource. public virtual StorageResourceCollection GetStorageResources() { @@ -301,7 +301,7 @@ public virtual Response GetStorageResource(string storageName, return GetStorageResources().Get(storageName, cancellationToken); } - /// Gets a collection of CertificateResources in the ServiceResource. + /// Gets a collection of CertificateResources in the AppPlatformServiceResource. /// An object representing collection of CertificateResources and their operations over a CertificateResource. public virtual CertificateResourceCollection GetCertificateResources() { @@ -338,7 +338,7 @@ public virtual Response GetCertificateResource(string certi return GetCertificateResources().Get(certificateName, cancellationToken); } - /// Gets a collection of GatewayResources in the ServiceResource. + /// Gets a collection of GatewayResources in the AppPlatformServiceResource. /// An object representing collection of GatewayResources and their operations over a GatewayResource. public virtual GatewayResourceCollection GetGatewayResources() { @@ -375,7 +375,7 @@ public virtual Response GetGatewayResource(string gatewayName, return GetGatewayResources().Get(gatewayName, cancellationToken); } - /// Gets a collection of ApiPortalResources in the ServiceResource. + /// Gets a collection of ApiPortalResources in the AppPlatformServiceResource. /// An object representing collection of ApiPortalResources and their operations over a ApiPortalResource. public virtual ApiPortalResourceCollection GetApiPortalResources() { @@ -418,16 +418,16 @@ public virtual Response GetApiPortalResource(string apiPortal /// Operation Id: Services_Get /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.Get"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResource.Get"); scope.Start(); try { - var response = await _serviceResourceServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _appPlatformServiceResourceServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ServiceResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppPlatformServiceResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -442,16 +442,16 @@ public virtual async Task> GetAsync(CancellationToken /// Operation Id: Services_Get /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.Get"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResource.Get"); scope.Start(); try { - var response = _serviceResourceServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _appPlatformServiceResourceServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ServiceResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppPlatformServiceResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -469,12 +469,12 @@ public virtual Response Get(CancellationToken cancellationToken /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.Delete"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResource.Delete"); scope.Start(); try { - var response = await _serviceResourceServicesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(_serviceResourceServicesClientDiagnostics, Pipeline, _serviceResourceServicesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appPlatformServiceResourceServicesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_appPlatformServiceResourceServicesClientDiagnostics, Pipeline, _appPlatformServiceResourceServicesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -495,12 +495,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.Delete"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResource.Delete"); scope.Start(); try { - var response = _serviceResourceServicesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new AppPlatformArmOperation(_serviceResourceServicesClientDiagnostics, Pipeline, _serviceResourceServicesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appPlatformServiceResourceServicesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_appPlatformServiceResourceServicesClientDiagnostics, Pipeline, _appPlatformServiceResourceServicesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -521,16 +521,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// Parameters for the update operation. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, ServiceResourceData data, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, AppPlatformServiceResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.Update"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResource.Update"); scope.Start(); try { - var response = await _serviceResourceServicesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(new ServiceResourceOperationSource(Client), _serviceResourceServicesClientDiagnostics, Pipeline, _serviceResourceServicesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appPlatformServiceResourceServicesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new AppPlatformServiceResourceOperationSource(Client), _appPlatformServiceResourceServicesClientDiagnostics, Pipeline, _appPlatformServiceResourceServicesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -551,16 +551,16 @@ public virtual async Task> UpdateAsync(WaitUntil w /// Parameters for the update operation. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, ServiceResourceData data, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, AppPlatformServiceResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.Update"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResource.Update"); scope.Start(); try { - var response = _serviceResourceServicesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken); - var operation = new AppPlatformArmOperation(new ServiceResourceOperationSource(Client), _serviceResourceServicesClientDiagnostics, Pipeline, _serviceResourceServicesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appPlatformServiceResourceServicesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken); + var operation = new AppPlatformArmOperation(new AppPlatformServiceResourceOperationSource(Client), _appPlatformServiceResourceServicesClientDiagnostics, Pipeline, _appPlatformServiceResourceServicesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -580,11 +580,11 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Service /// The cancellation token to use. public virtual async Task> GetTestKeysAsync(CancellationToken cancellationToken = default) { - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.GetTestKeys"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResource.GetTestKeys"); scope.Start(); try { - var response = await _serviceResourceServicesRestClient.ListTestKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _appPlatformServiceResourceServicesRestClient.ListTestKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -602,11 +602,11 @@ public virtual async Task> GetTestKeysAsync(CancellationToken /// The cancellation token to use. public virtual Response GetTestKeys(CancellationToken cancellationToken = default) { - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.GetTestKeys"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResource.GetTestKeys"); scope.Start(); try { - var response = _serviceResourceServicesRestClient.ListTestKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _appPlatformServiceResourceServicesRestClient.ListTestKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -628,11 +628,11 @@ public virtual async Task> RegenerateTestKeyAsync(RegenerateT { Argument.AssertNotNull(regenerateTestKeyRequest, nameof(regenerateTestKeyRequest)); - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.RegenerateTestKey"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResource.RegenerateTestKey"); scope.Start(); try { - var response = await _serviceResourceServicesRestClient.RegenerateTestKeyAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, regenerateTestKeyRequest, cancellationToken).ConfigureAwait(false); + var response = await _appPlatformServiceResourceServicesRestClient.RegenerateTestKeyAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, regenerateTestKeyRequest, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -654,11 +654,11 @@ public virtual Response RegenerateTestKey(RegenerateTestKeyRequestPayl { Argument.AssertNotNull(regenerateTestKeyRequest, nameof(regenerateTestKeyRequest)); - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.RegenerateTestKey"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResource.RegenerateTestKey"); scope.Start(); try { - var response = _serviceResourceServicesRestClient.RegenerateTestKey(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, regenerateTestKeyRequest, cancellationToken); + var response = _appPlatformServiceResourceServicesRestClient.RegenerateTestKey(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, regenerateTestKeyRequest, cancellationToken); return response; } catch (Exception e) @@ -676,11 +676,11 @@ public virtual Response RegenerateTestKey(RegenerateTestKeyRequestPayl /// The cancellation token to use. public virtual async Task DisableTestEndpointAsync(CancellationToken cancellationToken = default) { - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.DisableTestEndpoint"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResource.DisableTestEndpoint"); scope.Start(); try { - var response = await _serviceResourceServicesRestClient.DisableTestEndpointAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _appPlatformServiceResourceServicesRestClient.DisableTestEndpointAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -698,11 +698,11 @@ public virtual async Task DisableTestEndpointAsync(CancellationToken c /// The cancellation token to use. public virtual Response DisableTestEndpoint(CancellationToken cancellationToken = default) { - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.DisableTestEndpoint"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResource.DisableTestEndpoint"); scope.Start(); try { - var response = _serviceResourceServicesRestClient.DisableTestEndpoint(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _appPlatformServiceResourceServicesRestClient.DisableTestEndpoint(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -720,11 +720,11 @@ public virtual Response DisableTestEndpoint(CancellationToken cancellationToken /// The cancellation token to use. public virtual async Task> EnableTestEndpointAsync(CancellationToken cancellationToken = default) { - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.EnableTestEndpoint"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResource.EnableTestEndpoint"); scope.Start(); try { - var response = await _serviceResourceServicesRestClient.EnableTestEndpointAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _appPlatformServiceResourceServicesRestClient.EnableTestEndpointAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -742,11 +742,11 @@ public virtual async Task> EnableTestEndpointAsync(Cancellati /// The cancellation token to use. public virtual Response EnableTestEndpoint(CancellationToken cancellationToken = default) { - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.EnableTestEndpoint"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResource.EnableTestEndpoint"); scope.Start(); try { - var response = _serviceResourceServicesRestClient.EnableTestEndpoint(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _appPlatformServiceResourceServicesRestClient.EnableTestEndpoint(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -765,12 +765,12 @@ public virtual Response EnableTestEndpoint(CancellationToken cancellat /// The cancellation token to use. public virtual async Task StopAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.Stop"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResource.Stop"); scope.Start(); try { - var response = await _serviceResourceServicesRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(_serviceResourceServicesClientDiagnostics, Pipeline, _serviceResourceServicesRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appPlatformServiceResourceServicesRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_appPlatformServiceResourceServicesClientDiagnostics, Pipeline, _appPlatformServiceResourceServicesRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -791,12 +791,12 @@ public virtual async Task StopAsync(WaitUntil waitUntil, Cancellat /// The cancellation token to use. public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.Stop"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResource.Stop"); scope.Start(); try { - var response = _serviceResourceServicesRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new AppPlatformArmOperation(_serviceResourceServicesClientDiagnostics, Pipeline, _serviceResourceServicesRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appPlatformServiceResourceServicesRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_appPlatformServiceResourceServicesClientDiagnostics, Pipeline, _appPlatformServiceResourceServicesRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -817,12 +817,12 @@ public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancella /// The cancellation token to use. public virtual async Task StartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.Start"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResource.Start"); scope.Start(); try { - var response = await _serviceResourceServicesRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(_serviceResourceServicesClientDiagnostics, Pipeline, _serviceResourceServicesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appPlatformServiceResourceServicesRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_appPlatformServiceResourceServicesClientDiagnostics, Pipeline, _appPlatformServiceResourceServicesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -843,12 +843,12 @@ public virtual async Task StartAsync(WaitUntil waitUntil, Cancella /// The cancellation token to use. public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.Start"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResource.Start"); scope.Start(); try { - var response = _serviceResourceServicesRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new AppPlatformArmOperation(_serviceResourceServicesClientDiagnostics, Pipeline, _serviceResourceServicesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appPlatformServiceResourceServicesRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new AppPlatformArmOperation(_appPlatformServiceResourceServicesClientDiagnostics, Pipeline, _appPlatformServiceResourceServicesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -873,7 +873,7 @@ public virtual async Task> Vali { Argument.AssertNotNull(configServerSettings, nameof(configServerSettings)); - using var scope = _configServerResourceConfigServersClientDiagnostics.CreateScope("ServiceResource.ValidateConfigServer"); + using var scope = _configServerResourceConfigServersClientDiagnostics.CreateScope("AppPlatformServiceResource.ValidateConfigServer"); scope.Start(); try { @@ -903,7 +903,7 @@ public virtual ArmOperation ValidateConfigSe { Argument.AssertNotNull(configServerSettings, nameof(configServerSettings)); - using var scope = _configServerResourceConfigServersClientDiagnostics.CreateScope("ServiceResource.ValidateConfigServer"); + using var scope = _configServerResourceConfigServersClientDiagnostics.CreateScope("AppPlatformServiceResource.ValidateConfigServer"); scope.Start(); try { @@ -932,7 +932,7 @@ public virtual AsyncPageable GetForClusterDeploymentsAsyn { async Task> FirstPageFunc(int? pageSizeHint) { - using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("ServiceResource.GetForClusterDeployments"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppPlatformServiceResource.GetForClusterDeployments"); scope.Start(); try { @@ -947,7 +947,7 @@ async Task> FirstPageFunc(int? pageSizeHint) } async Task> NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("ServiceResource.GetForClusterDeployments"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppPlatformServiceResource.GetForClusterDeployments"); scope.Start(); try { @@ -975,7 +975,7 @@ public virtual Pageable GetForClusterDeployments(IEnumera { Page FirstPageFunc(int? pageSizeHint) { - using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("ServiceResource.GetForClusterDeployments"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppPlatformServiceResource.GetForClusterDeployments"); scope.Start(); try { @@ -990,7 +990,7 @@ Page FirstPageFunc(int? pageSizeHint) } Page NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("ServiceResource.GetForClusterDeployments"); + using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppPlatformServiceResource.GetForClusterDeployments"); scope.Start(); try { @@ -1015,20 +1015,20 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.AddTag"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResource.AddTag"); scope.Start(); try { var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues[key] = value; await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _serviceResourceServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new ServiceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _appPlatformServiceResourceServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new AppPlatformServiceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } catch (Exception e) { @@ -1046,20 +1046,20 @@ public virtual async Task> AddTagAsync(string key, str /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.AddTag"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResource.AddTag"); scope.Start(); try { var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _serviceResourceServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new ServiceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _appPlatformServiceResourceServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new AppPlatformServiceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } catch (Exception e) { @@ -1076,11 +1076,11 @@ public virtual Response AddTag(string key, string value, Cancel /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.SetTags"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResource.SetTags"); scope.Start(); try { @@ -1088,8 +1088,8 @@ public virtual async Task> SetTagsAsync(IDictionary> SetTagsAsync(IDictionary The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.SetTags"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResource.SetTags"); scope.Start(); try { @@ -1118,8 +1118,8 @@ public virtual Response SetTags(IDictionary tag var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.ReplaceWith(tags); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _serviceResourceServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new ServiceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _appPlatformServiceResourceServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new AppPlatformServiceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } catch (Exception e) { @@ -1136,19 +1136,19 @@ public virtual Response SetTags(IDictionary tag /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.RemoveTag"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResource.RemoveTag"); scope.Start(); try { var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.Remove(key); await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _serviceResourceServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new ServiceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _appPlatformServiceResourceServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new AppPlatformServiceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } catch (Exception e) { @@ -1165,19 +1165,19 @@ public virtual async Task> RemoveTagAsync(string key, /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResource.RemoveTag"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResource.RemoveTag"); scope.Start(); try { var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _serviceResourceServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new ServiceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _appPlatformServiceResourceServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new AppPlatformServiceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } catch (Exception e) { diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformServiceResourceCollection.cs similarity index 59% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceResourceCollection.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformServiceResourceCollection.cs index ff480f75be080..3889602beed01 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformServiceResourceCollection.cs @@ -21,28 +21,28 @@ 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 GetServiceResources method from an instance of . + /// 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 GetAppPlatformServiceResources method from an instance of . /// - public partial class ServiceResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class AppPlatformServiceResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _serviceResourceServicesClientDiagnostics; - private readonly ServicesRestOperations _serviceResourceServicesRestClient; + private readonly ClientDiagnostics _appPlatformServiceResourceServicesClientDiagnostics; + private readonly ServicesRestOperations _appPlatformServiceResourceServicesRestClient; - /// Initializes a new instance of the class for mocking. - protected ServiceResourceCollection() + /// Initializes a new instance of the class for mocking. + protected AppPlatformServiceResourceCollection() { } - /// Initializes a new instance of the class. + /// 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 ServiceResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal AppPlatformServiceResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _serviceResourceServicesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ServiceResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ServiceResource.ResourceType, out string serviceResourceServicesApiVersion); - _serviceResourceServicesRestClient = new ServicesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceResourceServicesApiVersion); + _appPlatformServiceResourceServicesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppPlatform", AppPlatformServiceResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AppPlatformServiceResource.ResourceType, out string appPlatformServiceResourceServicesApiVersion); + _appPlatformServiceResourceServicesRestClient = new ServicesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appPlatformServiceResourceServicesApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -65,17 +65,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// 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 serviceName, ServiceResourceData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string serviceName, AppPlatformServiceResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.CreateOrUpdate"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResourceCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _serviceResourceServicesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, serviceName, data, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(new ServiceResourceOperationSource(Client), _serviceResourceServicesClientDiagnostics, Pipeline, _serviceResourceServicesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, serviceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appPlatformServiceResourceServicesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, serviceName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(new AppPlatformServiceResourceOperationSource(Client), _appPlatformServiceResourceServicesClientDiagnostics, Pipeline, _appPlatformServiceResourceServicesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, serviceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -98,17 +98,17 @@ public virtual async Task> CreateOrUpdateAsync(Wai /// 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 serviceName, ServiceResourceData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string serviceName, AppPlatformServiceResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.CreateOrUpdate"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResourceCollection.CreateOrUpdate"); scope.Start(); try { - var response = _serviceResourceServicesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, serviceName, data, cancellationToken); - var operation = new AppPlatformArmOperation(new ServiceResourceOperationSource(Client), _serviceResourceServicesClientDiagnostics, Pipeline, _serviceResourceServicesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, serviceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appPlatformServiceResourceServicesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, serviceName, data, cancellationToken); + var operation = new AppPlatformArmOperation(new AppPlatformServiceResourceOperationSource(Client), _appPlatformServiceResourceServicesClientDiagnostics, Pipeline, _appPlatformServiceResourceServicesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, serviceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -129,18 +129,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string serviceName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.Get"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResourceCollection.Get"); scope.Start(); try { - var response = await _serviceResourceServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, serviceName, cancellationToken).ConfigureAwait(false); + var response = await _appPlatformServiceResourceServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, serviceName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ServiceResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppPlatformServiceResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -158,18 +158,18 @@ public virtual async Task> GetAsync(string serviceName /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string serviceName, CancellationToken cancellationToken = default) + public virtual Response Get(string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.Get"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResourceCollection.Get"); scope.Start(); try { - var response = _serviceResourceServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, serviceName, cancellationToken); + var response = _appPlatformServiceResourceServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, serviceName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ServiceResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new AppPlatformServiceResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -184,17 +184,17 @@ public virtual Response Get(string serviceName, CancellationTok /// Operation Id: Services_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) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.GetAll"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResourceCollection.GetAll"); scope.Start(); try { - var response = await _serviceResourceServicesRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new ServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = await _appPlatformServiceResourceServicesRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new AppPlatformServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -202,14 +202,14 @@ async Task> FirstPageFunc(int? pageSizeHint) throw; } } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) + async Task> NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.GetAll"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResourceCollection.GetAll"); scope.Start(); try { - var response = await _serviceResourceServicesRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new ServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = await _appPlatformServiceResourceServicesRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new AppPlatformServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -226,17 +226,17 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHin /// Operation Id: Services_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) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.GetAll"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResourceCollection.GetAll"); scope.Start(); try { - var response = _serviceResourceServicesRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new ServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = _appPlatformServiceResourceServicesRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AppPlatformServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -244,14 +244,14 @@ Page FirstPageFunc(int? pageSizeHint) throw; } } - Page NextPageFunc(string nextLink, int? pageSizeHint) + Page NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.GetAll"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResourceCollection.GetAll"); scope.Start(); try { - var response = _serviceResourceServicesRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new ServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = _appPlatformServiceResourceServicesRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AppPlatformServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -275,11 +275,11 @@ public virtual async Task> ExistsAsync(string serviceName, Cancel { Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.Exists"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResourceCollection.Exists"); scope.Start(); try { - var response = await _serviceResourceServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, serviceName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _appPlatformServiceResourceServicesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, serviceName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -302,11 +302,11 @@ public virtual Response Exists(string serviceName, CancellationToken cance { Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); - using var scope = _serviceResourceServicesClientDiagnostics.CreateScope("ServiceResourceCollection.Exists"); + using var scope = _appPlatformServiceResourceServicesClientDiagnostics.CreateScope("AppPlatformServiceResourceCollection.Exists"); scope.Start(); try { - var response = _serviceResourceServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, serviceName, cancellationToken: cancellationToken); + var response = _appPlatformServiceResourceServicesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, serviceName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -316,7 +316,7 @@ public virtual Response Exists(string serviceName, CancellationToken cance } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -326,7 +326,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceResourceData.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformServiceResourceData.cs similarity index 61% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceResourceData.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformServiceResourceData.cs index e60033bd67f59..4dcdb2695fc23 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceResourceData.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformServiceResourceData.cs @@ -12,16 +12,16 @@ namespace Azure.ResourceManager.AppPlatform { - /// A class representing the ServiceResource data model. - public partial class ServiceResourceData : TrackedResourceData + /// A class representing the AppPlatformServiceResource data model. + public partial class AppPlatformServiceResourceData : TrackedResourceData { - /// Initializes a new instance of ServiceResourceData. + /// Initializes a new instance of AppPlatformServiceResourceData. /// The location. - public ServiceResourceData(AzureLocation location) : base(location) + public AppPlatformServiceResourceData(AzureLocation location) : base(location) { } - /// Initializes a new instance of ServiceResourceData. + /// Initializes a new instance of AppPlatformServiceResourceData. /// The id. /// The name. /// The resourceType. @@ -30,7 +30,7 @@ public ServiceResourceData(AzureLocation location) : base(location) /// The location. /// Properties of the Service resource. /// Sku of the Service resource. - internal ServiceResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ClusterResourceProperties properties, AppPlatformSku sku) : base(id, name, resourceType, systemData, tags, location) + internal AppPlatformServiceResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ClusterResourceProperties properties, AppPlatformSku sku) : base(id, name, resourceType, systemData, tags, location) { Properties = properties; Sku = sku; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BindingResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BindingResource.cs index af752f7f50480..70beda9713c29 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BindingResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BindingResource.cs @@ -20,7 +20,7 @@ namespace Azure.ResourceManager.AppPlatform /// A Class representing a BindingResource 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 GetBindingResource method. - /// Otherwise you can get one from its parent resource using the GetBindingResource method. + /// Otherwise you can get one from its parent resource using the GetBindingResource method. /// public partial class BindingResource : ArmResource { diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BindingResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BindingResourceCollection.cs index 4373ba0f2e217..3213892b50fa5 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BindingResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/BindingResourceCollection.cs @@ -21,8 +21,8 @@ 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 GetBindingResources method from an instance of . + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetBindingResources method from an instance of . /// public partial class BindingResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable { @@ -49,8 +49,8 @@ internal BindingResourceCollection(ArmClient client, ResourceIdentifier id) : ba internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != AppResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AppResource.ResourceType), nameof(id)); + if (id.ResourceType != AppPlatformAppResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AppPlatformAppResource.ResourceType), nameof(id)); } /// diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CertificateResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CertificateResource.cs index ced4d50b357e7..61615f814f5f1 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CertificateResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CertificateResource.cs @@ -20,7 +20,7 @@ namespace Azure.ResourceManager.AppPlatform /// A Class representing a CertificateResource 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 GetCertificateResource method. - /// Otherwise you can get one from its parent resource using the GetCertificateResource method. + /// Otherwise you can get one from its parent resource using the GetCertificateResource method. /// public partial class CertificateResource : ArmResource { diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CertificateResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CertificateResourceCollection.cs index ee4e10edb0b37..635fd896308b6 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CertificateResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/CertificateResourceCollection.cs @@ -21,8 +21,8 @@ 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 GetCertificateResources method from an instance of . + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetCertificateResources method from an instance of . /// public partial class CertificateResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable { @@ -49,8 +49,8 @@ internal CertificateResourceCollection(ArmClient client, ResourceIdentifier id) internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != ServiceResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ServiceResource.ResourceType), nameof(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)); } /// diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigServerResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigServerResource.cs index 12a4d58394f39..18f05a3b9d47c 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigServerResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigServerResource.cs @@ -20,7 +20,7 @@ namespace Azure.ResourceManager.AppPlatform /// A Class representing a ConfigServerResource 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 GetConfigServerResource method. - /// Otherwise you can get one from its parent resource using the GetConfigServerResource method. + /// Otherwise you can get one from its parent resource using the GetConfigServerResource method. /// public partial class ConfigServerResource : ArmResource { diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigurationServiceResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigurationServiceResource.cs index 840ae0be52c88..18764a4e54af6 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigurationServiceResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigurationServiceResource.cs @@ -21,7 +21,7 @@ namespace Azure.ResourceManager.AppPlatform /// A Class representing a ConfigurationServiceResource 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 GetConfigurationServiceResource method. - /// Otherwise you can get one from its parent resource using the GetConfigurationServiceResource method. + /// Otherwise you can get one from its parent resource using the GetConfigurationServiceResource method. /// public partial class ConfigurationServiceResource : ArmResource { diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigurationServiceResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigurationServiceResourceCollection.cs index 283fe1a278f89..e34993b68ead0 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigurationServiceResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ConfigurationServiceResourceCollection.cs @@ -21,8 +21,8 @@ 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 GetConfigurationServiceResources method from an instance of . + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetConfigurationServiceResources method from an instance of . /// public partial class ConfigurationServiceResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable { @@ -49,8 +49,8 @@ internal ConfigurationServiceResourceCollection(ArmClient client, ResourceIdenti internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != ServiceResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ServiceResource.ResourceType), nameof(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)); } /// 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 5af23464ee5d7..d6fca6fb9173c 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/AppPlatformExtensions.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/AppPlatformExtensions.cs @@ -73,7 +73,7 @@ private static SubscriptionResourceExtensionClient GetExtensionClient(Subscripti /// Parameters supplied to the operation. /// The cancellation token to use. /// is null. - public static async Task> CheckServiceNameAvailabilityAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CheckNameAvailabilityContent content, CancellationToken cancellationToken = default) + public static async Task> CheckServiceNameAvailabilityAsync(this SubscriptionResource subscriptionResource, AzureLocation location, ServiceNameAvailabilityContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -90,7 +90,7 @@ public static async Task> CheckServiceName /// Parameters supplied to the operation. /// The cancellation token to use. /// is null. - public static Response CheckServiceNameAvailability(this SubscriptionResource subscriptionResource, AzureLocation location, CheckNameAvailabilityContent content, CancellationToken cancellationToken = default) + public static Response CheckServiceNameAvailability(this SubscriptionResource subscriptionResource, AzureLocation location, ServiceNameAvailabilityContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -104,10 +104,10 @@ public static Response CheckServiceNameAvailability /// /// The instance the method will execute against. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetServiceResourcesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetAppPlatformServiceResourcesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetExtensionClient(subscriptionResource).GetServiceResourcesAsync(cancellationToken); + return GetExtensionClient(subscriptionResource).GetAppPlatformServiceResourcesAsync(cancellationToken); } /// @@ -117,10 +117,10 @@ public static AsyncPageable GetServiceResourcesAsync(this Subsc /// /// The instance the method will execute against. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetServiceResources(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetAppPlatformServiceResources(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetExtensionClient(subscriptionResource).GetServiceResources(cancellationToken); + return GetExtensionClient(subscriptionResource).GetAppPlatformServiceResources(cancellationToken); } /// @@ -130,8 +130,8 @@ public static Pageable GetServiceResources(this SubscriptionRes /// /// The instance the method will execute against. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetSkusAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetSkusAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { return GetExtensionClient(subscriptionResource).GetSkusAsync(cancellationToken); } @@ -143,8 +143,8 @@ public static AsyncPageable GetSkusAsync(this SubscriptionResource /// /// The instance the method will execute against. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetSkus(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetSkus(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { return GetExtensionClient(subscriptionResource).GetSkus(cancellationToken); } @@ -158,12 +158,12 @@ private static ResourceGroupResourceExtensionClient GetExtensionClient(ResourceG ); } - /// Gets a collection of ServiceResources in the ResourceGroupResource. + /// Gets a collection of AppPlatformServiceResources in the ResourceGroupResource. /// The instance the method will execute against. - /// An object representing collection of ServiceResources and their operations over a ServiceResource. - public static ServiceResourceCollection GetServiceResources(this ResourceGroupResource resourceGroupResource) + /// An object representing collection of AppPlatformServiceResources and their operations over a AppPlatformServiceResource. + public static AppPlatformServiceResourceCollection GetAppPlatformServiceResources(this ResourceGroupResource resourceGroupResource) { - return GetExtensionClient(resourceGroupResource).GetServiceResources(); + return GetExtensionClient(resourceGroupResource).GetAppPlatformServiceResources(); } /// @@ -177,9 +177,9 @@ public static ServiceResourceCollection GetServiceResources(this ResourceGroupRe /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public static async Task> GetServiceResourceAsync(this ResourceGroupResource resourceGroupResource, string serviceName, CancellationToken cancellationToken = default) + public static async Task> GetAppPlatformServiceResourceAsync(this ResourceGroupResource resourceGroupResource, string serviceName, CancellationToken cancellationToken = default) { - return await resourceGroupResource.GetServiceResources().GetAsync(serviceName, cancellationToken).ConfigureAwait(false); + return await resourceGroupResource.GetAppPlatformServiceResources().GetAsync(serviceName, cancellationToken).ConfigureAwait(false); } /// @@ -193,25 +193,25 @@ public static async Task> GetServiceResourceAsync(this /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public static Response GetServiceResource(this ResourceGroupResource resourceGroupResource, string serviceName, CancellationToken cancellationToken = default) + public static Response GetAppPlatformServiceResource(this ResourceGroupResource resourceGroupResource, string serviceName, CancellationToken cancellationToken = default) { - return resourceGroupResource.GetServiceResources().Get(serviceName, cancellationToken); + return resourceGroupResource.GetAppPlatformServiceResources().Get(serviceName, cancellationToken); } - #region ServiceResource + #region AppPlatformServiceResource /// - /// 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. + /// 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 ServiceResource GetServiceResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AppPlatformServiceResource GetAppPlatformServiceResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - ServiceResource.ValidateResourceId(id); - return new ServiceResource(client, id); + AppPlatformServiceResource.ValidateResourceId(id); + return new AppPlatformServiceResource(client, id); } ); } @@ -445,20 +445,20 @@ public static MonitoringSettingResource GetMonitoringSettingResource(this ArmCli } #endregion - #region AppResource + #region AppPlatformAppResource /// - /// 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. + /// 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 AppResource GetAppResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AppPlatformAppResource GetAppPlatformAppResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - AppResource.ValidateResourceId(id); - return new AppResource(client, id); + AppPlatformAppResource.ValidateResourceId(id); + return new AppPlatformAppResource(client, id); } ); } @@ -521,20 +521,20 @@ public static CertificateResource GetCertificateResource(this ArmClient client, } #endregion - #region CustomDomainResource + #region AppPlatformCustomDomainResource /// - /// 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. + /// 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 CustomDomainResource GetCustomDomainResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AppPlatformCustomDomainResource GetAppPlatformCustomDomainResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - CustomDomainResource.ValidateResourceId(id); - return new CustomDomainResource(client, id); + AppPlatformCustomDomainResource.ValidateResourceId(id); + return new AppPlatformCustomDomainResource(client, id); } ); } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs index 9ceadcdb86299..439cf5b8a97d7 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs @@ -31,11 +31,11 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } - /// Gets a collection of ServiceResources in the ResourceGroupResource. - /// An object representing collection of ServiceResources and their operations over a ServiceResource. - public virtual ServiceResourceCollection GetServiceResources() + /// Gets a collection of AppPlatformServiceResources in the ResourceGroupResource. + /// An object representing collection of AppPlatformServiceResources and their operations over a AppPlatformServiceResource. + public virtual AppPlatformServiceResourceCollection GetAppPlatformServiceResources() { - return GetCachedClient(Client => new ServiceResourceCollection(Client, Id)); + return GetCachedClient(Client => new AppPlatformServiceResourceCollection(Client, Id)); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs index 4f7244d4a3705..a68fff34ca5ba 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -20,8 +20,8 @@ namespace Azure.ResourceManager.AppPlatform /// A class to add extension methods to SubscriptionResource. internal partial class SubscriptionResourceExtensionClient : ArmResource { - private ClientDiagnostics _serviceResourceServicesClientDiagnostics; - private ServicesRestOperations _serviceResourceServicesRestClient; + private ClientDiagnostics _appPlatformServiceResourceServicesClientDiagnostics; + private ServicesRestOperations _appPlatformServiceResourceServicesRestClient; private ClientDiagnostics _skusClientDiagnostics; private SkusRestOperations _skusRestClient; @@ -37,8 +37,8 @@ internal SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifie { } - private ClientDiagnostics ServiceResourceServicesClientDiagnostics => _serviceResourceServicesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ServiceResource.ResourceType.Namespace, Diagnostics); - private ServicesRestOperations ServiceResourceServicesRestClient => _serviceResourceServicesRestClient ??= new ServicesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ServiceResource.ResourceType)); + private ClientDiagnostics AppPlatformServiceResourceServicesClientDiagnostics => _appPlatformServiceResourceServicesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.AppPlatform", AppPlatformServiceResource.ResourceType.Namespace, Diagnostics); + private ServicesRestOperations AppPlatformServiceResourceServicesRestClient => _appPlatformServiceResourceServicesRestClient ??= new ServicesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(AppPlatformServiceResource.ResourceType)); private ClientDiagnostics SkusClientDiagnostics => _skusClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.AppPlatform", ProviderConstants.DefaultProviderNamespace, Diagnostics); private SkusRestOperations SkusRestClient => _skusRestClient ??= new SkusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); @@ -56,13 +56,13 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// the region. /// Parameters supplied to the operation. /// The cancellation token to use. - public virtual async Task> CheckServiceNameAvailabilityAsync(AzureLocation location, CheckNameAvailabilityContent content, CancellationToken cancellationToken = default) + public virtual async Task> CheckServiceNameAvailabilityAsync(AzureLocation location, ServiceNameAvailabilityContent content, CancellationToken cancellationToken = default) { - using var scope = ServiceResourceServicesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckServiceNameAvailability"); + using var scope = AppPlatformServiceResourceServicesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckServiceNameAvailability"); scope.Start(); try { - var response = await ServiceResourceServicesRestClient.CheckNameAvailabilityAsync(Id.SubscriptionId, location, content, cancellationToken).ConfigureAwait(false); + var response = await AppPlatformServiceResourceServicesRestClient.CheckNameAvailabilityAsync(Id.SubscriptionId, location, content, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -80,13 +80,13 @@ public virtual async Task> CheckServiceNam /// the region. /// Parameters supplied to the operation. /// The cancellation token to use. - public virtual Response CheckServiceNameAvailability(AzureLocation location, CheckNameAvailabilityContent content, CancellationToken cancellationToken = default) + public virtual Response CheckServiceNameAvailability(AzureLocation location, ServiceNameAvailabilityContent content, CancellationToken cancellationToken = default) { - using var scope = ServiceResourceServicesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckServiceNameAvailability"); + using var scope = AppPlatformServiceResourceServicesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckServiceNameAvailability"); scope.Start(); try { - var response = ServiceResourceServicesRestClient.CheckNameAvailability(Id.SubscriptionId, location, content, cancellationToken); + var response = AppPlatformServiceResourceServicesRestClient.CheckNameAvailability(Id.SubscriptionId, location, content, cancellationToken); return response; } catch (Exception e) @@ -102,17 +102,17 @@ public virtual Response CheckServiceNameAvailabilit /// Operation Id: Services_ListBySubscription /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetServiceResourcesAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAppPlatformServiceResourcesAsync(CancellationToken cancellationToken = default) { - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { - using var scope = ServiceResourceServicesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetServiceResources"); + using var scope = AppPlatformServiceResourceServicesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetAppPlatformServiceResources"); scope.Start(); try { - var response = await ServiceResourceServicesRestClient.ListBySubscriptionAsync(Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new ServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = await AppPlatformServiceResourceServicesRestClient.ListBySubscriptionAsync(Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new AppPlatformServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -120,14 +120,14 @@ async Task> FirstPageFunc(int? pageSizeHint) throw; } } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) + async Task> NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = ServiceResourceServicesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetServiceResources"); + using var scope = AppPlatformServiceResourceServicesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetAppPlatformServiceResources"); scope.Start(); try { - var response = await ServiceResourceServicesRestClient.ListBySubscriptionNextPageAsync(nextLink, Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new ServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = await AppPlatformServiceResourceServicesRestClient.ListBySubscriptionNextPageAsync(nextLink, Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new AppPlatformServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -144,17 +144,17 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHin /// Operation Id: Services_ListBySubscription /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetServiceResources(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAppPlatformServiceResources(CancellationToken cancellationToken = default) { - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { - using var scope = ServiceResourceServicesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetServiceResources"); + using var scope = AppPlatformServiceResourceServicesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetAppPlatformServiceResources"); scope.Start(); try { - var response = ServiceResourceServicesRestClient.ListBySubscription(Id.SubscriptionId, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new ServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = AppPlatformServiceResourceServicesRestClient.ListBySubscription(Id.SubscriptionId, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AppPlatformServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -162,14 +162,14 @@ Page FirstPageFunc(int? pageSizeHint) throw; } } - Page NextPageFunc(string nextLink, int? pageSizeHint) + Page NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = ServiceResourceServicesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetServiceResources"); + using var scope = AppPlatformServiceResourceServicesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetAppPlatformServiceResources"); scope.Start(); try { - var response = ServiceResourceServicesRestClient.ListBySubscriptionNextPage(nextLink, Id.SubscriptionId, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new ServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = AppPlatformServiceResourceServicesRestClient.ListBySubscriptionNextPage(nextLink, Id.SubscriptionId, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AppPlatformServiceResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -186,10 +186,10 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) /// Operation Id: Skus_List /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetSkusAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSkusAsync(CancellationToken cancellationToken = default) { - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { using var scope = SkusClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetSkus"); scope.Start(); @@ -204,7 +204,7 @@ async Task> FirstPageFunc(int? pageSizeHint) throw; } } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) + async Task> NextPageFunc(string nextLink, int? pageSizeHint) { using var scope = SkusClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetSkus"); scope.Start(); @@ -228,10 +228,10 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint) /// Operation Id: Skus_List /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetSkus(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSkus(CancellationToken cancellationToken = default) { - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { using var scope = SkusClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetSkus"); scope.Start(); @@ -246,7 +246,7 @@ Page FirstPageFunc(int? pageSizeHint) throw; } } - Page NextPageFunc(string nextLink, int? pageSizeHint) + Page NextPageFunc(string nextLink, int? pageSizeHint) { using var scope = SkusClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetSkus"); scope.Start(); diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayResource.cs index 7fc680d1b0109..54dd410f5a18f 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayResource.cs @@ -21,7 +21,7 @@ namespace Azure.ResourceManager.AppPlatform /// A Class representing a GatewayResource 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 GetGatewayResource method. - /// Otherwise you can get one from its parent resource using the GetGatewayResource method. + /// Otherwise you can get one from its parent resource using the GetGatewayResource method. /// public partial class GatewayResource : ArmResource { diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayResourceCollection.cs index 5452c949fbe37..67ab5ff556847 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/GatewayResourceCollection.cs @@ -21,8 +21,8 @@ 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 GetGatewayResources method from an instance of . + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetGatewayResources method from an instance of . /// public partial class GatewayResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable { @@ -49,8 +49,8 @@ internal GatewayResourceCollection(ArmClient client, ResourceIdentifier id) : ba internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != ServiceResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ServiceResource.ResourceType), nameof(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)); } /// diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppPlatformAppResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppPlatformAppResourceOperationSource.cs new file mode 100644 index 0000000000000..afa516e7d8901 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppPlatformAppResourceOperationSource.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 AppPlatformAppResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal AppPlatformAppResourceOperationSource(ArmClient client) + { + _client = client; + } + + AppPlatformAppResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = AppPlatformAppResourceData.DeserializeAppPlatformAppResourceData(document.RootElement); + return new AppPlatformAppResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = AppPlatformAppResourceData.DeserializeAppPlatformAppResourceData(document.RootElement); + return new AppPlatformAppResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppPlatformCustomDomainResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppPlatformCustomDomainResourceOperationSource.cs new file mode 100644 index 0000000000000..c43dc0abef1d8 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppPlatformCustomDomainResourceOperationSource.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 AppPlatformCustomDomainResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal AppPlatformCustomDomainResourceOperationSource(ArmClient client) + { + _client = client; + } + + AppPlatformCustomDomainResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = AppPlatformCustomDomainResourceData.DeserializeAppPlatformCustomDomainResourceData(document.RootElement); + return new AppPlatformCustomDomainResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = AppPlatformCustomDomainResourceData.DeserializeAppPlatformCustomDomainResourceData(document.RootElement); + return new AppPlatformCustomDomainResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppPlatformServiceResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppPlatformServiceResourceOperationSource.cs new file mode 100644 index 0000000000000..3883fcad84f15 --- /dev/null +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppPlatformServiceResourceOperationSource.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 AppPlatformServiceResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal AppPlatformServiceResourceOperationSource(ArmClient client) + { + _client = client; + } + + AppPlatformServiceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = AppPlatformServiceResourceData.DeserializeAppPlatformServiceResourceData(document.RootElement); + return new AppPlatformServiceResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = AppPlatformServiceResourceData.DeserializeAppPlatformServiceResourceData(document.RootElement); + return new AppPlatformServiceResource(_client, data); + } + } +} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppResourceOperationSource.cs deleted file mode 100644 index e408bea4cd5dd..0000000000000 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/AppResourceOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// 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 AppResourceOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal AppResourceOperationSource(ArmClient client) - { - _client = client; - } - - AppResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = AppResourceData.DeserializeAppResourceData(document.RootElement); - return new AppResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = AppResourceData.DeserializeAppResourceData(document.RootElement); - return new AppResource(_client, data); - } - } -} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/CustomDomainResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/CustomDomainResourceOperationSource.cs deleted file mode 100644 index 5971f611ac909..0000000000000 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/CustomDomainResourceOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// 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 CustomDomainResourceOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal CustomDomainResourceOperationSource(ArmClient client) - { - _client = client; - } - - CustomDomainResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = CustomDomainResourceData.DeserializeCustomDomainResourceData(document.RootElement); - return new CustomDomainResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = CustomDomainResourceData.DeserializeCustomDomainResourceData(document.RootElement); - return new CustomDomainResource(_client, data); - } - } -} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ServiceResourceOperationSource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ServiceResourceOperationSource.cs deleted file mode 100644 index 4ad51063f56c7..0000000000000 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/LongRunningOperation/ServiceResourceOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// 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 ServiceResourceOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal ServiceResourceOperationSource(ArmClient client) - { - _client = client; - } - - ServiceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = ServiceResourceData.DeserializeServiceResourceData(document.RootElement); - return new ServiceResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = ServiceResourceData.DeserializeServiceResourceData(document.RootElement); - return new ServiceResource(_client, data); - } - } -} diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalProperties.Serialization.cs index a478db9d459e8..411cc99fe8979 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalProperties.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalProperties.Serialization.cs @@ -37,13 +37,13 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(SourceUrls)) + if (Optional.IsCollectionDefined(SourceUris)) { writer.WritePropertyName("sourceUrls"); writer.WriteStartArray(); - foreach (var item in SourceUrls) + foreach (var item in SourceUris) { - writer.WriteStringValue(item); + writer.WriteStringValue(item.AbsoluteUri); } writer.WriteEndArray(); } @@ -62,7 +62,7 @@ internal static ApiPortalProperties DeserializeApiPortalProperties(JsonElement e Optional url = default; Optional httpsOnly = default; Optional> gatewayIds = default; - Optional> sourceUrls = default; + Optional> sourceUrls = default; Optional ssoProperties = default; Optional resourceRequests = default; Optional> instances = default; @@ -130,10 +130,10 @@ internal static ApiPortalProperties DeserializeApiPortalProperties(JsonElement e property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(item.GetString()); + array.Add(new Uri(item.GetString())); } sourceUrls = array; continue; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalProperties.cs index 700bfad582d08..31038aa79b829 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalProperties.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ApiPortalProperties.cs @@ -18,7 +18,7 @@ public partial class ApiPortalProperties public ApiPortalProperties() { GatewayIds = new ChangeTrackingList(); - SourceUrls = new ChangeTrackingList(); + SourceUris = new ChangeTrackingList(); Instances = new ChangeTrackingList(); } @@ -28,18 +28,18 @@ public ApiPortalProperties() /// URL of the API portal, exposed when 'public' is true. /// Indicate if only https is allowed. /// The array of resource Ids of gateway to integrate with API portal. - /// Collection of OpenAPI source URL locations. + /// Collection of OpenAPI source URL locations. /// Single sign-on related configuration. /// The requested resource quantity for required CPU and Memory. /// Collection of instances belong to API portal. - internal ApiPortalProperties(ApiPortalProvisioningState? provisioningState, bool? @public, Uri uri, bool? httpsOnly, IList gatewayIds, IList sourceUrls, SsoProperties ssoProperties, ApiPortalResourceRequests resourceRequests, IReadOnlyList instances) + internal ApiPortalProperties(ApiPortalProvisioningState? provisioningState, bool? @public, Uri uri, bool? httpsOnly, IList gatewayIds, IList sourceUris, SsoProperties ssoProperties, ApiPortalResourceRequests resourceRequests, IReadOnlyList instances) { ProvisioningState = provisioningState; Public = @public; Uri = uri; HttpsOnly = httpsOnly; GatewayIds = gatewayIds; - SourceUrls = sourceUrls; + SourceUris = sourceUris; SsoProperties = ssoProperties; ResourceRequests = resourceRequests; Instances = instances; @@ -56,7 +56,7 @@ internal ApiPortalProperties(ApiPortalProvisioningState? provisioningState, bool /// The array of resource Ids of gateway to integrate with API portal. public IList GatewayIds { get; } /// Collection of OpenAPI source URL locations. - public IList SourceUrls { get; } + public IList SourceUris { get; } /// Single sign-on related configuration. public SsoProperties SsoProperties { get; set; } /// The requested resource quantity for required CPU and Memory. diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformAppResourceData.Serialization.cs similarity index 92% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceData.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformAppResourceData.Serialization.cs index c1ba29d543c0c..4b43dea04e831 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceData.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformAppResourceData.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.AppPlatform { - public partial class AppResourceData : IUtf8JsonSerializable + public partial class AppPlatformAppResourceData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -36,7 +36,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static AppResourceData DeserializeAppResourceData(JsonElement element) + internal static AppPlatformAppResourceData DeserializeAppPlatformAppResourceData(JsonElement element) { Optional properties = default; Optional identity = default; @@ -99,7 +99,7 @@ internal static AppResourceData DeserializeAppResourceData(JsonElement element) continue; } } - return new AppResourceData(id, name, type, systemData, properties.Value, identity, Optional.ToNullable(location)); + return new AppPlatformAppResourceData(id, name, type, systemData, properties.Value, identity, Optional.ToNullable(location)); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformCustomDomainResourceData.Serialization.cs similarity index 87% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceData.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformCustomDomainResourceData.Serialization.cs index b9a80d3cad6bb..d51949868005a 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceData.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformCustomDomainResourceData.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.AppPlatform { - public partial class CustomDomainResourceData : IUtf8JsonSerializable + public partial class AppPlatformCustomDomainResourceData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -25,7 +25,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static CustomDomainResourceData DeserializeCustomDomainResourceData(JsonElement element) + internal static AppPlatformCustomDomainResourceData DeserializeAppPlatformCustomDomainResourceData(JsonElement element) { Optional properties = default; ResourceIdentifier id = default; @@ -65,7 +65,7 @@ internal static CustomDomainResourceData DeserializeCustomDomainResourceData(Jso continue; } } - return new CustomDomainResourceData(id, name, type, systemData, properties.Value); + return new AppPlatformCustomDomainResourceData(id, name, type, systemData, properties.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceResourceData.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformServiceResourceData.Serialization.cs similarity index 92% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceResourceData.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformServiceResourceData.Serialization.cs index fcad3b00727fc..ccc28810e10a7 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceResourceData.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformServiceResourceData.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.AppPlatform { - public partial class ServiceResourceData : IUtf8JsonSerializable + public partial class AppPlatformServiceResourceData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -41,7 +41,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static ServiceResourceData DeserializeServiceResourceData(JsonElement element) + internal static AppPlatformServiceResourceData DeserializeAppPlatformServiceResourceData(JsonElement element) { Optional properties = default; Optional sku = default; @@ -109,7 +109,7 @@ internal static ServiceResourceData DeserializeServiceResourceData(JsonElement e continue; } } - return new ServiceResourceData(id, name, type, systemData, tags, location, properties.Value, sku.Value); + return new AppPlatformServiceResourceData(id, name, type, systemData, tags, location, properties.Value, sku.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceList.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceList.Serialization.cs index 66c42cbfe4be8..44a1014b6d884 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceList.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceList.Serialization.cs @@ -16,7 +16,7 @@ internal partial class AppResourceList { internal static AppResourceList DeserializeAppResourceList(JsonElement element) { - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -27,10 +27,10 @@ internal static AppResourceList DeserializeAppResourceList(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AppResourceData.DeserializeAppResourceData(item)); + array.Add(AppPlatformAppResourceData.DeserializeAppPlatformAppResourceData(item)); } value = array; continue; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceList.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceList.cs index 105577ab68db9..99c49ce62c17b 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceList.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceList.cs @@ -17,7 +17,7 @@ internal partial class AppResourceList /// Initializes a new instance of AppResourceList. internal AppResourceList() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of AppResourceList. @@ -26,14 +26,14 @@ internal AppResourceList() /// URL client should use to fetch the next page (per server side paging). /// It's null for now, added for future use. /// - internal AppResourceList(IReadOnlyList value, string nextLink) + internal AppResourceList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// Collection of App resources. - public IReadOnlyList Value { get; } + 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. diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProperties.Serialization.cs index af33687b4d997..3b6154cc40a62 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProperties.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProperties.Serialization.cs @@ -73,10 +73,10 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndArray(); } - if (Optional.IsDefined(EnableEndToEndTLS)) + if (Optional.IsDefined(EnableEndToEndTls)) { writer.WritePropertyName("enableEndToEndTLS"); - writer.WriteBooleanValue(EnableEndToEndTLS.Value); + writer.WriteBooleanValue(EnableEndToEndTls.Value); } if (Optional.IsCollectionDefined(LoadedCertificates)) { diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProperties.cs index 894cca8e5f48c..08d6e2913b1cf 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProperties.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProperties.cs @@ -32,9 +32,9 @@ public AppResourceProperties() /// Temporary disk settings. /// Persistent disk settings. /// List of custom persistent disks. - /// Indicate if end to end TLS is enabled. + /// Indicate if end to end TLS is enabled. /// Collection of loaded certificates. - internal AppResourceProperties(bool? @public, Uri uri, IDictionary> addonConfigs, AppResourceProvisioningState? provisioningState, string fqdn, bool? httpsOnly, TemporaryDisk temporaryDisk, PersistentDisk persistentDisk, IList customPersistentDisks, bool? enableEndToEndTLS, IList loadedCertificates) + internal AppResourceProperties(bool? @public, Uri uri, IDictionary> addonConfigs, AppResourceProvisioningState? provisioningState, string fqdn, bool? httpsOnly, TemporaryDisk temporaryDisk, PersistentDisk persistentDisk, IList customPersistentDisks, bool? enableEndToEndTls, IList loadedCertificates) { Public = @public; Uri = uri; @@ -45,7 +45,7 @@ internal AppResourceProperties(bool? @public, Uri uri, IDictionary List of custom persistent disks. public IList CustomPersistentDisks { get; } /// Indicate if end to end TLS is enabled. - public bool? EnableEndToEndTLS { get; set; } + public bool? EnableEndToEndTls { get; set; } /// Collection of loaded certificates. public IList LoadedCertificates { get; } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSku.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AvailableAppPlatformSku.Serialization.cs similarity index 91% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSku.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AvailableAppPlatformSku.Serialization.cs index 0bd0222928dc0..5a5e99263f27c 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSku.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AvailableAppPlatformSku.Serialization.cs @@ -11,9 +11,9 @@ namespace Azure.ResourceManager.AppPlatform.Models { - public partial class ResourceSku + public partial class AvailableAppPlatformSku { - internal static ResourceSku DeserializeResourceSku(JsonElement element) + internal static AvailableAppPlatformSku DeserializeAvailableAppPlatformSku(JsonElement element) { Optional resourceType = default; Optional name = default; @@ -100,7 +100,7 @@ internal static ResourceSku DeserializeResourceSku(JsonElement element) continue; } } - return new ResourceSku(Optional.ToNullable(resourceType), name.Value, tier.Value, capacity.Value, Optional.ToList(locations), Optional.ToList(locationInfo), Optional.ToList(restrictions)); + return new AvailableAppPlatformSku(Optional.ToNullable(resourceType), name.Value, tier.Value, capacity.Value, Optional.ToList(locations), Optional.ToList(locationInfo), Optional.ToList(restrictions)); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSku.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AvailableAppPlatformSku.cs similarity index 82% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSku.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AvailableAppPlatformSku.cs index e184e5153c27f..4785cd73ab7f6 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSku.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AvailableAppPlatformSku.cs @@ -11,17 +11,17 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Describes an available Azure Spring Cloud SKU. - public partial class ResourceSku + public partial class AvailableAppPlatformSku { - /// Initializes a new instance of ResourceSku. - internal ResourceSku() + /// Initializes a new instance of AvailableAppPlatformSku. + internal AvailableAppPlatformSku() { Locations = new ChangeTrackingList(); LocationInfo = new ChangeTrackingList(); Restrictions = new ChangeTrackingList(); } - /// Initializes a new instance of ResourceSku. + /// Initializes a new instance of AvailableAppPlatformSku. /// Gets the type of resource the SKU applies to. /// Gets the name of SKU. /// Gets the tier of SKU. @@ -32,7 +32,7 @@ internal ResourceSku() /// Gets the restrictions because of which SKU cannot be used. This is /// empty if there are no restrictions. /// - internal ResourceSku(ResourceType? resourceType, string name, string tier, SkuCapacity capacity, IReadOnlyList locations, IReadOnlyList locationInfo, IReadOnlyList restrictions) + internal AvailableAppPlatformSku(ResourceType? resourceType, string name, string tier, SkuCapacity capacity, IReadOnlyList locations, IReadOnlyList locationInfo, IReadOnlyList restrictions) { ResourceType = resourceType; Name = name; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingType.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingType.cs index f5aab3a2406a1..3d9b0428d1d24 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingType.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/BindingType.cs @@ -27,7 +27,7 @@ public BindingType(string value) private const string AppDynamicsValue = "AppDynamics"; private const string DynatraceValue = "Dynatrace"; private const string NewRelicValue = "NewRelic"; - private const string ElasticAPMValue = "ElasticAPM"; + private const string ElasticApmValue = "ElasticAPM"; /// ApplicationInsights. public static BindingType ApplicationInsights { get; } = new BindingType(ApplicationInsightsValue); @@ -40,7 +40,7 @@ public BindingType(string value) /// NewRelic. public static BindingType NewRelic { get; } = new BindingType(NewRelicValue); /// ElasticAPM. - public static BindingType ElasticAPM { get; } = new BindingType(ElasticAPMValue); + public static BindingType ElasticApm { get; } = new BindingType(ElasticApmValue); /// Determines if two values are the same. public static bool operator ==(BindingType left, BindingType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceList.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceList.Serialization.cs index f38958c9c6316..51d8f506274bd 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceList.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceList.Serialization.cs @@ -16,7 +16,7 @@ internal partial class CustomDomainResourceList { internal static CustomDomainResourceList DeserializeCustomDomainResourceList(JsonElement element) { - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -27,10 +27,10 @@ internal static CustomDomainResourceList DeserializeCustomDomainResourceList(Jso property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(CustomDomainResourceData.DeserializeCustomDomainResourceData(item)); + array.Add(AppPlatformCustomDomainResourceData.DeserializeAppPlatformCustomDomainResourceData(item)); } value = array; continue; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceList.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceList.cs index 2d08cc23f3c24..97aeef917e960 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceList.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomDomainResourceList.cs @@ -17,20 +17,20 @@ internal partial class CustomDomainResourceList /// Initializes a new instance of CustomDomainResourceList. internal CustomDomainResourceList() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of CustomDomainResourceList. /// The custom domain resources list. /// The link to next page of custom domain list. - internal CustomDomainResourceList(IReadOnlyList value, string nextLink) + internal CustomDomainResourceList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// The custom domain resources list. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// The link to next page of custom domain list. public string NextLink { get; } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUrlResponse.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUriResponse.Serialization.cs similarity index 79% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUrlResponse.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUriResponse.Serialization.cs index 24b2b29853ae9..b124afc943cef 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUrlResponse.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUriResponse.Serialization.cs @@ -11,9 +11,9 @@ namespace Azure.ResourceManager.AppPlatform.Models { - public partial class LogFileUrlResponse + public partial class LogFileUriResponse { - internal static LogFileUrlResponse DeserializeLogFileUrlResponse(JsonElement element) + internal static LogFileUriResponse DeserializeLogFileUriResponse(JsonElement element) { Uri url = default; foreach (var property in element.EnumerateObject()) @@ -24,7 +24,7 @@ internal static LogFileUrlResponse DeserializeLogFileUrlResponse(JsonElement ele continue; } } - return new LogFileUrlResponse(url); + return new LogFileUriResponse(url); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUrlResponse.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUriResponse.cs similarity index 82% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUrlResponse.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUriResponse.cs index 1e4d783a7e682..de161ffd077e7 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUrlResponse.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUriResponse.cs @@ -10,12 +10,12 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Log file URL payload. - public partial class LogFileUrlResponse + public partial class LogFileUriResponse { - /// Initializes a new instance of LogFileUrlResponse. + /// Initializes a new instance of LogFileUriResponse. /// URL of the log file. /// is null. - internal LogFileUrlResponse(Uri uri) + internal LogFileUriResponse(Uri uri) { if (uri == null) { diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuList.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuList.Serialization.cs index 9f5a0d0035dd1..bea8b179e7b25 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuList.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuList.Serialization.cs @@ -15,7 +15,7 @@ internal partial class ResourceSkuList { internal static ResourceSkuList DeserializeResourceSkuList(JsonElement element) { - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -26,10 +26,10 @@ internal static ResourceSkuList DeserializeResourceSkuList(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(ResourceSku.DeserializeResourceSku(item)); + array.Add(AvailableAppPlatformSku.DeserializeAvailableAppPlatformSku(item)); } value = array; continue; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuList.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuList.cs index 380bfe8d8c348..f1ec96d4a6ea5 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuList.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuList.cs @@ -16,7 +16,7 @@ internal partial class ResourceSkuList /// Initializes a new instance of ResourceSkuList. internal ResourceSkuList() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of ResourceSkuList. @@ -25,14 +25,14 @@ internal ResourceSkuList() /// URL client should use to fetch the next page (per server side paging). /// It's null for now, added for future use. /// - internal ResourceSkuList(IReadOnlyList value, string nextLink) + internal ResourceSkuList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// Collection of resource SKU. - public IReadOnlyList Value { get; } + 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. diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictionInfo.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictionInfo.Serialization.cs index 08a182577509d..2f91592ef82f7 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictionInfo.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictionInfo.Serialization.cs @@ -15,7 +15,7 @@ public partial class ResourceSkuRestrictionInfo { internal static ResourceSkuRestrictionInfo DeserializeResourceSkuRestrictionInfo(JsonElement element) { - Optional> locations = default; + Optional> locations = default; Optional> zones = default; foreach (var property in element.EnumerateObject()) { @@ -26,10 +26,10 @@ internal static ResourceSkuRestrictionInfo DeserializeResourceSkuRestrictionInfo property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(item.GetString()); + array.Add(new AzureLocation(item.GetString())); } locations = array; continue; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictionInfo.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictionInfo.cs index aa6712981c160..4823444e742aa 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictionInfo.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceSkuRestrictionInfo.cs @@ -16,21 +16,21 @@ public partial class ResourceSkuRestrictionInfo /// Initializes a new instance of ResourceSkuRestrictionInfo. internal ResourceSkuRestrictionInfo() { - Locations = new ChangeTrackingList(); + Locations = new ChangeTrackingList(); Zones = new ChangeTrackingList(); } /// Initializes a new instance of ResourceSkuRestrictionInfo. /// Gets locations where the SKU is restricted. /// Gets list of availability zones where the SKU is restricted. - internal ResourceSkuRestrictionInfo(IReadOnlyList locations, IReadOnlyList zones) + internal ResourceSkuRestrictionInfo(IReadOnlyList locations, IReadOnlyList zones) { Locations = locations; Zones = zones; } /// Gets locations where the SKU is restricted. - public IReadOnlyList Locations { get; } + public IReadOnlyList Locations { get; } /// Gets list of availability zones where the SKU is restricted. public IReadOnlyList Zones { get; } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CheckNameAvailabilityContent.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceNameAvailabilityContent.Serialization.cs similarity index 88% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CheckNameAvailabilityContent.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceNameAvailabilityContent.Serialization.cs index ac846a406aeed..8001b5d9c7e17 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CheckNameAvailabilityContent.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceNameAvailabilityContent.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.AppPlatform.Models { - public partial class CheckNameAvailabilityContent : IUtf8JsonSerializable + public partial class ServiceNameAvailabilityContent : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CheckNameAvailabilityContent.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceNameAvailabilityContent.cs similarity index 83% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CheckNameAvailabilityContent.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceNameAvailabilityContent.cs index 8c5db334026fd..f5c0d51b21267 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CheckNameAvailabilityContent.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceNameAvailabilityContent.cs @@ -10,13 +10,13 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Name availability parameters payload. - public partial class CheckNameAvailabilityContent + public partial class ServiceNameAvailabilityContent { - /// Initializes a new instance of CheckNameAvailabilityContent. + /// Initializes a new instance of ServiceNameAvailabilityContent. /// Type of the resource to check name availability. /// Name to be checked. /// or is null. - public CheckNameAvailabilityContent(string resourceType, string name) + public ServiceNameAvailabilityContent(string resourceType, string name) { if (resourceType == null) { diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CheckNameAvailabilityResult.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceNameAvailabilityResult.Serialization.cs similarity index 81% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CheckNameAvailabilityResult.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceNameAvailabilityResult.Serialization.cs index f7757cdc6f093..7e86bf19018af 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CheckNameAvailabilityResult.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceNameAvailabilityResult.Serialization.cs @@ -10,9 +10,9 @@ namespace Azure.ResourceManager.AppPlatform.Models { - public partial class CheckNameAvailabilityResult + public partial class ServiceNameAvailabilityResult { - internal static CheckNameAvailabilityResult DeserializeCheckNameAvailabilityResult(JsonElement element) + internal static ServiceNameAvailabilityResult DeserializeServiceNameAvailabilityResult(JsonElement element) { Optional nameAvailable = default; Optional reason = default; @@ -40,7 +40,7 @@ internal static CheckNameAvailabilityResult DeserializeCheckNameAvailabilityResu continue; } } - return new CheckNameAvailabilityResult(Optional.ToNullable(nameAvailable), reason.Value, message.Value); + return new ServiceNameAvailabilityResult(Optional.ToNullable(nameAvailable), reason.Value, message.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CheckNameAvailabilityResult.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceNameAvailabilityResult.cs similarity index 72% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CheckNameAvailabilityResult.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceNameAvailabilityResult.cs index 5e259919142b7..b28a923f8cffc 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CheckNameAvailabilityResult.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceNameAvailabilityResult.cs @@ -8,18 +8,18 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Name availability result payload. - public partial class CheckNameAvailabilityResult + public partial class ServiceNameAvailabilityResult { - /// Initializes a new instance of CheckNameAvailabilityResult. - internal CheckNameAvailabilityResult() + /// Initializes a new instance of ServiceNameAvailabilityResult. + internal ServiceNameAvailabilityResult() { } - /// Initializes a new instance of CheckNameAvailabilityResult. + /// Initializes a new instance of ServiceNameAvailabilityResult. /// Indicates whether the name is available. /// Reason why the name is not available. /// Message why the name is not available. - internal CheckNameAvailabilityResult(bool? nameAvailable, string reason, string message) + internal ServiceNameAvailabilityResult(bool? nameAvailable, string reason, string message) { NameAvailable = nameAvailable; Reason = reason; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceResourceList.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceResourceList.Serialization.cs index a82aef5227d95..b1c59d57e2478 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceResourceList.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceResourceList.Serialization.cs @@ -16,7 +16,7 @@ internal partial class ServiceResourceList { internal static ServiceResourceList DeserializeServiceResourceList(JsonElement element) { - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -27,10 +27,10 @@ internal static ServiceResourceList DeserializeServiceResourceList(JsonElement e property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(ServiceResourceData.DeserializeServiceResourceData(item)); + array.Add(AppPlatformServiceResourceData.DeserializeAppPlatformServiceResourceData(item)); } value = array; continue; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceResourceList.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceResourceList.cs index fe660ca9a21a5..6c5731abc0721 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceResourceList.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ServiceResourceList.cs @@ -17,7 +17,7 @@ internal partial class ServiceResourceList /// Initializes a new instance of ServiceResourceList. internal ServiceResourceList() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of ServiceResourceList. @@ -26,14 +26,14 @@ internal ServiceResourceList() /// URL client should use to fetch the next page (per server side paging). /// It's null for now, added for future use. /// - internal ServiceResourceList(IReadOnlyList value, string nextLink) + internal ServiceResourceList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// Collection of Service resources. - public IReadOnlyList Value { get; } + 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. diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/MonitoringSettingResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/MonitoringSettingResource.cs index 2b02fd665eaac..b8c1306df1869 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/MonitoringSettingResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/MonitoringSettingResource.cs @@ -20,7 +20,7 @@ namespace Azure.ResourceManager.AppPlatform /// A Class representing a MonitoringSettingResource 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 GetMonitoringSettingResource method. - /// Otherwise you can get one from its parent resource using the GetMonitoringSettingResource method. + /// Otherwise you can get one from its parent resource using the GetMonitoringSettingResource method. /// public partial class MonitoringSettingResource : ArmResource { 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 97791430cdc4b..3f7b7740f04ae 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/AppsRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/AppsRestOperations.cs @@ -72,7 +72,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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 appName, string syncStatus = null, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string syncStatus = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -85,13 +85,13 @@ public async Task> GetAsync(string subscriptionId, str { case 200: { - AppResourceData value = default; + AppPlatformAppResourceData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AppResourceData.DeserializeAppResourceData(document.RootElement); + value = AppPlatformAppResourceData.DeserializeAppPlatformAppResourceData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((AppResourceData)null, message.Response); + return Response.FromValue((AppPlatformAppResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -106,7 +106,7 @@ public async Task> GetAsync(string subscriptionId, str /// 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 appName, string syncStatus = null, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string appName, string syncStatus = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -119,19 +119,19 @@ public Response Get(string subscriptionId, string resourceGroup { case 200: { - AppResourceData value = default; + AppPlatformAppResourceData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AppResourceData.DeserializeAppResourceData(document.RootElement); + value = AppPlatformAppResourceData.DeserializeAppPlatformAppResourceData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((AppResourceData)null, message.Response); + return Response.FromValue((AppPlatformAppResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, AppResourceData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, AppPlatformAppResourceData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -166,7 +166,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// 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 appName, AppResourceData data, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, AppPlatformAppResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -196,7 +196,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re /// 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 appName, AppResourceData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string appName, AppPlatformAppResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -295,7 +295,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string s } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, AppResourceData data) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, AppPlatformAppResourceData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -330,7 +330,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, AppResourceData data, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, AppPlatformAppResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -359,7 +359,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string serviceName, string appName, AppResourceData data, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string serviceName, string appName, AppPlatformAppResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -458,7 +458,7 @@ public Response List(string subscriptionId, string resourceGrou } } - internal HttpMessage CreateGetResourceUploadUrlRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName) + internal HttpMessage CreateGetResourceUploadUriRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -489,14 +489,14 @@ internal HttpMessage CreateGetResourceUploadUrlRequest(string subscriptionId, st /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetResourceUploadUrlAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, CancellationToken cancellationToken = default) + public async Task> GetResourceUploadUriAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); Argument.AssertNotNullOrEmpty(appName, nameof(appName)); - using var message = CreateGetResourceUploadUrlRequest(subscriptionId, resourceGroupName, serviceName, appName); + using var message = CreateGetResourceUploadUriRequest(subscriptionId, resourceGroupName, serviceName, appName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -520,14 +520,14 @@ public async Task> GetResourceUploadUrlAsync( /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response GetResourceUploadUrl(string subscriptionId, string resourceGroupName, string serviceName, string appName, CancellationToken cancellationToken = default) + public Response GetResourceUploadUri(string subscriptionId, string resourceGroupName, string serviceName, string appName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); Argument.AssertNotNullOrEmpty(appName, nameof(appName)); - using var message = CreateGetResourceUploadUrlRequest(subscriptionId, resourceGroupName, serviceName, appName); + using var message = CreateGetResourceUploadUriRequest(subscriptionId, resourceGroupName, serviceName, appName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { 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 f85b7c7473705..88d747514ab99 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceRestOperations.cs @@ -771,7 +771,7 @@ public Response GetBuildResultLog(string subscriptionId, string } } - internal HttpMessage CreateGetResourceUploadUrlRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName) + internal HttpMessage CreateGetResourceUploadUriRequest(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -802,14 +802,14 @@ internal HttpMessage CreateGetResourceUploadUrlRequest(string subscriptionId, st /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetResourceUploadUrlAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) + public async Task> GetResourceUploadUriAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); - using var message = CreateGetResourceUploadUrlRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName); + using var message = CreateGetResourceUploadUriRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -833,14 +833,14 @@ public async Task> GetResourceUploadUrlAsync( /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response GetResourceUploadUrl(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) + public Response GetResourceUploadUri(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); Argument.AssertNotNullOrEmpty(buildServiceName, nameof(buildServiceName)); - using var message = CreateGetResourceUploadUrlRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName); + using var message = CreateGetResourceUploadUriRequest(subscriptionId, resourceGroupName, serviceName, buildServiceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { 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 9e059c00c5ee7..beeb9a25c3307 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/CustomDomainsRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/CustomDomainsRestOperations.cs @@ -70,7 +70,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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 appName, string domainName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string domainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -84,13 +84,13 @@ public async Task> GetAsync(string subscripti { case 200: { - CustomDomainResourceData value = default; + AppPlatformCustomDomainResourceData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CustomDomainResourceData.DeserializeCustomDomainResourceData(document.RootElement); + value = AppPlatformCustomDomainResourceData.DeserializeAppPlatformCustomDomainResourceData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((CustomDomainResourceData)null, message.Response); + return Response.FromValue((AppPlatformCustomDomainResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -105,7 +105,7 @@ public async Task> GetAsync(string subscripti /// 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 appName, string domainName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string appName, string domainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -119,19 +119,19 @@ public Response Get(string subscriptionId, string reso { case 200: { - CustomDomainResourceData value = default; + AppPlatformCustomDomainResourceData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CustomDomainResourceData.DeserializeCustomDomainResourceData(document.RootElement); + value = AppPlatformCustomDomainResourceData.DeserializeAppPlatformCustomDomainResourceData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((CustomDomainResourceData)null, message.Response); + return Response.FromValue((AppPlatformCustomDomainResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string domainName, CustomDomainResourceData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string domainName, AppPlatformCustomDomainResourceData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -169,7 +169,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// 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 appName, string domainName, CustomDomainResourceData data, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string domainName, AppPlatformCustomDomainResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -201,7 +201,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re /// 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 appName, string domainName, CustomDomainResourceData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string appName, string domainName, AppPlatformCustomDomainResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -307,7 +307,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string s } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string domainName, CustomDomainResourceData data) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string domainName, AppPlatformCustomDomainResourceData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -345,7 +345,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string domainName, CustomDomainResourceData data, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string domainName, AppPlatformCustomDomainResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -376,7 +376,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// The cancellation token to use. /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string serviceName, string appName, string domainName, CustomDomainResourceData data, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string serviceName, string appName, string domainName, AppPlatformCustomDomainResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); 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 d1e3d0d416b4f..2fb7e2780fb5c 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/DeploymentsRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/DeploymentsRestOperations.cs @@ -829,7 +829,7 @@ public Response Restart(string subscriptionId, string resourceGroupName, string } } - internal HttpMessage CreateGetLogFileUrlRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName) + internal HttpMessage CreateGetLogFileUriRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -863,7 +863,7 @@ internal HttpMessage CreateGetLogFileUrlRequest(string subscriptionId, string re /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetLogFileUrlAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, CancellationToken cancellationToken = default) + public async Task> GetLogFileUriAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -871,19 +871,19 @@ public async Task> GetLogFileUrlAsync(string subscr Argument.AssertNotNullOrEmpty(appName, nameof(appName)); Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - using var message = CreateGetLogFileUrlRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName); + using var message = CreateGetLogFileUriRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - LogFileUrlResponse value = default; + LogFileUriResponse value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = LogFileUrlResponse.DeserializeLogFileUrlResponse(document.RootElement); + value = LogFileUriResponse.DeserializeLogFileUriResponse(document.RootElement); return Response.FromValue(value, message.Response); } case 204: - return Response.FromValue((LogFileUrlResponse)null, message.Response); + return Response.FromValue((LogFileUriResponse)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -898,7 +898,7 @@ public async Task> GetLogFileUrlAsync(string subscr /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public Response GetLogFileUrl(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, CancellationToken cancellationToken = default) + public Response GetLogFileUri(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -906,19 +906,19 @@ public Response GetLogFileUrl(string subscriptionId, string Argument.AssertNotNullOrEmpty(appName, nameof(appName)); Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - using var message = CreateGetLogFileUrlRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName); + using var message = CreateGetLogFileUriRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - LogFileUrlResponse value = default; + LogFileUriResponse value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = LogFileUrlResponse.DeserializeLogFileUrlResponse(document.RootElement); + value = LogFileUriResponse.DeserializeLogFileUriResponse(document.RootElement); return Response.FromValue(value, message.Response); } case 204: - return Response.FromValue((LogFileUrlResponse)null, message.Response); + return Response.FromValue((LogFileUriResponse)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -1106,7 +1106,7 @@ public Response GenerateThreadDump(string subscriptionId, string resourceGroupNa } } - internal HttpMessage CreateStartJFRRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticParameters diagnosticParameters) + internal HttpMessage CreateStartJfrRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticParameters diagnosticParameters) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1145,7 +1145,7 @@ internal HttpMessage CreateStartJFRRequest(string subscriptionId, string resourc /// The cancellation token to use. /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public async Task StartJFRAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + public async Task StartJfrAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -1154,7 +1154,7 @@ public async Task StartJFRAsync(string subscriptionId, string resource Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); - using var message = CreateStartJFRRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters); + using var message = CreateStartJfrRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -1176,7 +1176,7 @@ public async Task StartJFRAsync(string subscriptionId, string resource /// The cancellation token to use. /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public Response StartJFR(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + public Response StartJfr(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -1185,7 +1185,7 @@ public Response StartJFR(string subscriptionId, string resourceGroupName, string Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); - using var message = CreateStartJFRRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters); + using var message = CreateStartJfrRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { 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 681dd3fdf3162..722162e662235 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ServicesRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/ServicesRestOperations.cs @@ -64,7 +64,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -76,13 +76,13 @@ public async Task> GetAsync(string subscriptionId, { case 200: { - ServiceResourceData value = default; + AppPlatformServiceResourceData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ServiceResourceData.DeserializeServiceResourceData(document.RootElement); + value = AppPlatformServiceResourceData.DeserializeAppPlatformServiceResourceData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((ServiceResourceData)null, message.Response); + return Response.FromValue((AppPlatformServiceResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -95,7 +95,7 @@ public async Task> GetAsync(string subscriptionId, /// 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, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -107,19 +107,19 @@ public Response Get(string subscriptionId, string resourceG { case 200: { - ServiceResourceData value = default; + AppPlatformServiceResourceData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ServiceResourceData.DeserializeServiceResourceData(document.RootElement); + value = AppPlatformServiceResourceData.DeserializeAppPlatformServiceResourceData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((ServiceResourceData)null, message.Response); + return Response.FromValue((AppPlatformServiceResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, ServiceResourceData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, AppPlatformServiceResourceData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -151,7 +151,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// 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, ServiceResourceData data, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, AppPlatformServiceResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -179,7 +179,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re /// 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, ServiceResourceData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, AppPlatformServiceResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -271,7 +271,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string s } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, ServiceResourceData data) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, AppPlatformServiceResourceData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -303,7 +303,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, ServiceResourceData data, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, AppPlatformServiceResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -330,7 +330,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string serviceName, ServiceResourceData data, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string serviceName, AppPlatformServiceResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -801,7 +801,7 @@ public Response Start(string subscriptionId, string resourceGroupName, string se } } - internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, AzureLocation location, CheckNameAvailabilityContent content) + internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, AzureLocation location, ServiceNameAvailabilityContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -831,7 +831,7 @@ internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, A /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public async Task> CheckNameAvailabilityAsync(string subscriptionId, AzureLocation location, CheckNameAvailabilityContent content, CancellationToken cancellationToken = default) + public async Task> CheckNameAvailabilityAsync(string subscriptionId, AzureLocation location, ServiceNameAvailabilityContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNull(content, nameof(content)); @@ -842,9 +842,9 @@ public async Task> CheckNameAvailabilityAs { case 200: { - CheckNameAvailabilityResult value = default; + ServiceNameAvailabilityResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CheckNameAvailabilityResult.DeserializeCheckNameAvailabilityResult(document.RootElement); + value = ServiceNameAvailabilityResult.DeserializeServiceNameAvailabilityResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -859,7 +859,7 @@ public async Task> CheckNameAvailabilityAs /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public Response CheckNameAvailability(string subscriptionId, AzureLocation location, CheckNameAvailabilityContent content, CancellationToken cancellationToken = default) + public Response CheckNameAvailability(string subscriptionId, AzureLocation location, ServiceNameAvailabilityContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNull(content, nameof(content)); @@ -870,9 +870,9 @@ public Response CheckNameAvailability(string subscr { case 200: { - CheckNameAvailabilityResult value = default; + ServiceNameAvailabilityResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CheckNameAvailabilityResult.DeserializeCheckNameAvailabilityResult(document.RootElement); + value = ServiceNameAvailabilityResult.DeserializeServiceNameAvailabilityResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceRegistryResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceRegistryResource.cs index 051ea0ae706fd..5725fc43b6cdd 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceRegistryResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceRegistryResource.cs @@ -20,7 +20,7 @@ namespace Azure.ResourceManager.AppPlatform /// A Class representing a ServiceRegistryResource 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 GetServiceRegistryResource method. - /// Otherwise you can get one from its parent resource using the GetServiceRegistryResource method. + /// Otherwise you can get one from its parent resource using the GetServiceRegistryResource method. /// public partial class ServiceRegistryResource : ArmResource { diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceRegistryResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceRegistryResourceCollection.cs index ee694edcbf789..b6293e98bdd47 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceRegistryResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/ServiceRegistryResourceCollection.cs @@ -21,8 +21,8 @@ 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 GetServiceRegistryResources method from an instance of . + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetServiceRegistryResources method from an instance of . /// public partial class ServiceRegistryResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable { @@ -49,8 +49,8 @@ internal ServiceRegistryResourceCollection(ArmClient client, ResourceIdentifier internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != ServiceResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ServiceResource.ResourceType), nameof(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)); } /// diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/StorageResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/StorageResource.cs index 6cda24dd6488e..c2df075cf4a24 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/StorageResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/StorageResource.cs @@ -20,7 +20,7 @@ namespace Azure.ResourceManager.AppPlatform /// A Class representing a StorageResource 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 GetStorageResource method. - /// Otherwise you can get one from its parent resource using the GetStorageResource method. + /// Otherwise you can get one from its parent resource using the GetStorageResource method. /// public partial class StorageResource : ArmResource { diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/StorageResourceCollection.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/StorageResourceCollection.cs index e50fe2c4f1b59..6b00b2bb1ecb0 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/StorageResourceCollection.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/StorageResourceCollection.cs @@ -21,8 +21,8 @@ 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 GetStorageResources method from an instance of . + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetStorageResources method from an instance of . /// public partial class StorageResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable { @@ -49,8 +49,8 @@ internal StorageResourceCollection(ArmClient client, ResourceIdentifier id) : ba internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != ServiceResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ServiceResource.ResourceType), nameof(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)); } /// diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md index 52392cdb014c2..6887205b0f235 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md @@ -35,6 +35,11 @@ rename-rules: Ipsec: IPsec SSO: Sso URI: Uri + JFR: Jfr + TLS: Tls + APM: Apm + Url: Uri + Urls: Uris override-operation-name: Services_CheckNameAvailability: CheckServiceNameAvailability @@ -70,8 +75,8 @@ directive: $.BindingResourceProperties.properties.resourceId['x-ms-format'] = 'arm-id'; $.NetworkProfile.properties.serviceRuntimeSubnetId['x-ms-format'] = 'arm-id'; $.NetworkProfile.properties.appSubnetId['x-ms-format'] = 'arm-id'; - $.NameAvailabilityParameters['x-ms-client-name'] = 'CheckNameAvailabilityContent'; - $.NameAvailability['x-ms-client-name'] = 'CheckNameAvailabilityResult'; + $.NameAvailabilityParameters['x-ms-client-name'] = 'ServiceNameAvailabilityParameters'; + $.NameAvailability['x-ms-client-name'] = 'ServiceNameAvailabilityResult'; $.GatewayRouteConfigResourceCollection['x-ms-client-name'] = 'GatewayRouteConfigResourceList'; $.GatewayCustomDomainResourceCollection['x-ms-client-name'] = 'GatewayCustomDomainResourceList'; $.ApiPortalResourceCollection['x-ms-client-name'] = 'ApiPortalResourceList'; @@ -99,5 +104,9 @@ directive: $.BuildpackBindingResourceCollection['x-ms-client-name'] = 'BuildpackBindingResourceList'; $.GatewayResourceCollection['x-ms-client-name'] = 'GatewayResourceList'; $.ResourceSku.properties.locations.items['x-ms-format'] = 'azure-location'; - + $.ResourceSku['x-ms-client-name'] = 'AvailableAppPlatformSku'; + $.ResourceSkuRestrictionInfo.properties.locations.items['x-ms-format'] = 'azure-location'; + $.CustomDomainResource['x-ms-client-name'] = 'AppPlatformCustomDomainResource'; + $.ServiceResource['x-ms-client-name'] = 'AppPlatformServiceResource'; + $.AppResource['x-ms-client-name'] = 'AppPlatformAppResource'; ``` \ No newline at end of file From f901ab8a81240496e45627df5bf6976870859c96 Mon Sep 17 00:00:00 2001 From: Arthur Ma Date: Sun, 5 Jun 2022 17:20:01 +0800 Subject: [PATCH 8/9] Change the template path --- sdk/appplatform/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/appplatform/ci.yml b/sdk/appplatform/ci.yml index b1ac9ec3ad869..cddf942bf8483 100644 --- a/sdk/appplatform/ci.yml +++ b/sdk/appplatform/ci.yml @@ -23,7 +23,7 @@ pr: - sdk/resourcemanager/ extends: - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: appplatform ArtifactName: packages From 32951d6b68330c358277ea4561e5544b0016e208 Mon Sep 17 00:00:00 2001 From: Arthur Ma Date: Tue, 7 Jun 2022 18:10:12 +0800 Subject: [PATCH 9/9] renames... --- ...ourceManager.AppPlatform.netstandard2.0.cs | 68 ++++++------ .../src/Generated/AppBuildServiceResource.cs | 4 +- .../src/Generated/AppDeploymentResource.cs | 76 ++++++------- .../src/Generated/AppPlatformAppResource.cs | 4 +- ... => AppPlatformErrorInfo.Serialization.cs} | 6 +- .../{Error.cs => AppPlatformErrorInfo.cs} | 10 +- .../AppResourceProperties.Serialization.cs | 6 +- .../Generated/Models/AppResourceProperties.cs | 6 +- .../ConfigServerProperties.Serialization.cs | 4 +- .../Models/ConfigServerProperties.cs | 4 +- ...CustomPersistentDiskData.Serialization.cs} | 6 +- ...esource.cs => CustomPersistentDiskData.cs} | 10 +- ....cs => DiagnosticContent.Serialization.cs} | 2 +- ...sticParameters.cs => DiagnosticContent.cs} | 6 +- ...n.cs => LogFileUriResult.Serialization.cs} | 6 +- ...FileUriResponse.cs => LogFileUriResult.cs} | 6 +- ...nitoringSettingProperties.Serialization.cs | 4 +- .../Models/MonitoringSettingProperties.cs | 4 +- ... => ResourceUploadResult.Serialization.cs} | 6 +- ...dDefinition.cs => ResourceUploadResult.cs} | 10 +- .../Models/SupportedRuntimePlatform.cs | 4 +- .../RestOperations/AppsRestOperations.cs | 12 +-- .../BuildServiceRestOperations.cs | 12 +-- .../DeploymentsRestOperations.cs | 100 +++++++++--------- .../src/autorest.md | 6 ++ 25 files changed, 194 insertions(+), 188 deletions(-) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{Error.Serialization.cs => AppPlatformErrorInfo.Serialization.cs} (84%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{Error.cs => AppPlatformErrorInfo.cs} (68%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{CustomPersistentDiskResource.Serialization.cs => CustomPersistentDiskData.Serialization.cs} (85%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{CustomPersistentDiskResource.cs => CustomPersistentDiskData.cs} (83%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{DiagnosticParameters.Serialization.cs => DiagnosticContent.Serialization.cs} (93%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{DiagnosticParameters.cs => DiagnosticContent.cs} (79%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{LogFileUriResponse.Serialization.cs => LogFileUriResult.Serialization.cs} (75%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{LogFileUriResponse.cs => LogFileUriResult.cs} (87%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{ResourceUploadDefinition.Serialization.cs => ResourceUploadResult.Serialization.cs} (81%) rename sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/{ResourceUploadDefinition.cs => ResourceUploadResult.cs} (79%) 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 a0c7b0acc8024..4885a5c49803e 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 @@ -244,8 +244,8 @@ protected AppBuildServiceResource() { } public virtual System.Threading.Tasks.Task> GetAppBuildServiceAgentPoolResourceAsync(string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppPlatform.AppBuildServiceAgentPoolResourceCollection GetAppBuildServiceAgentPoolResources() { throw null; } 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.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.Response GetSupportedBuildpackResource(string buildpackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSupportedBuildpackResourceAsync(string buildpackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppPlatform.SupportedBuildpackResourceCollection GetSupportedBuildpackResources() { throw null; } @@ -262,20 +262,20 @@ protected AppDeploymentResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName) { 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.ResourceManager.ArmOperation GenerateHeapDump(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GenerateHeapDumpAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation GenerateThreadDump(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GenerateThreadDumpAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation GenerateHeapDump(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GenerateHeapDumpAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation GenerateThreadDump(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GenerateThreadDumpAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticContent content, 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 GetLogFileUri(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetLogFileUriAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetLogFileUri(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetLogFileUriAsync(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 Start(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task StartAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation StartJfr(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StartJfrAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticParameters diagnosticParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation StartJfr(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartJfrAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.DiagnosticContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Stop(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task StopAsync(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.AppDeploymentResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -322,8 +322,8 @@ protected AppPlatformAppResource() { } public virtual Azure.Response GetBindingResource(string bindingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetBindingResourceAsync(string bindingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppPlatform.BindingResourceCollection GetBindingResources() { 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.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 SetActiveDeployments(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.ActiveDeploymentList activeDeploymentCollection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetActiveDeploymentsAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.Models.ActiveDeploymentList activeDeploymentCollection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppPlatform.AppPlatformAppResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1032,6 +1032,12 @@ public AppBuildProperties() { } public static bool operator !=(Azure.ResourceManager.AppPlatform.Models.AppBuildProvisioningState left, Azure.ResourceManager.AppPlatform.Models.AppBuildProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class AppPlatformErrorInfo + { + public AppPlatformErrorInfo() { } + public string Code { get { throw null; } set { } } + public string Message { get { throw null; } set { } } + } public partial class AppPlatformSku { public AppPlatformSku() { } @@ -1043,7 +1049,7 @@ public partial class AppResourceProperties { public AppResourceProperties() { } public System.Collections.Generic.IDictionary> AddonConfigs { get { throw null; } } - public System.Collections.Generic.IList CustomPersistentDisks { get { throw null; } } + public System.Collections.Generic.IList CustomPersistentDisks { get { throw null; } } public bool? EnableEndToEndTls { get { throw null; } set { } } public string Fqdn { get { throw null; } set { } } public bool? HttpsOnly { get { throw null; } set { } } @@ -1297,7 +1303,7 @@ public partial class ConfigServerProperties { public ConfigServerProperties() { } public Azure.ResourceManager.AppPlatform.Models.ConfigServerGitProperty ConfigServerGitProperty { get { throw null; } set { } } - public Azure.ResourceManager.AppPlatform.Models.Error Error { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.AppPlatformErrorInfo Error { get { throw null; } set { } } public Azure.ResourceManager.AppPlatform.Models.ConfigServerState? ProvisioningState { get { throw null; } } } public partial class ConfigServerSettings @@ -1450,6 +1456,12 @@ internal CustomDomainValidateResult() { } public bool? IsValid { get { throw null; } } public string Message { get { throw null; } } } + public partial class CustomPersistentDiskData + { + public CustomPersistentDiskData(string storageId) { } + public Azure.ResourceManager.AppPlatform.Models.CustomPersistentDiskProperties CustomPersistentDiskProperties { get { throw null; } set { } } + public string StorageId { get { throw null; } set { } } + } public partial class CustomPersistentDiskProperties { public CustomPersistentDiskProperties(string mountPath) { } @@ -1457,12 +1469,6 @@ public CustomPersistentDiskProperties(string mountPath) { } public string MountPath { get { throw null; } set { } } public bool? ReadOnly { get { throw null; } set { } } } - public partial class CustomPersistentDiskResource - { - public CustomPersistentDiskResource(string storageId) { } - public Azure.ResourceManager.AppPlatform.Models.CustomPersistentDiskProperties CustomPersistentDiskProperties { get { throw null; } set { } } - public string StorageId { get { throw null; } set { } } - } public partial class DeploymentInstance { internal DeploymentInstance() { } @@ -1529,19 +1535,13 @@ public DeploymentSettings() { } public System.Collections.Generic.IDictionary EnvironmentVariables { get { throw null; } } public Azure.ResourceManager.AppPlatform.Models.ResourceRequests ResourceRequests { get { throw null; } set { } } } - public partial class DiagnosticParameters + public partial class DiagnosticContent { - public DiagnosticParameters() { } + public DiagnosticContent() { } public string AppInstance { get { throw null; } set { } } public string DurationValue { get { throw null; } set { } } public string FilePath { get { throw null; } set { } } } - public partial class Error - { - public Error() { } - public string Code { get { throw null; } set { } } - public string Message { get { throw null; } set { } } - } public partial class GatewayApiMetadataProperties { public GatewayApiMetadataProperties() { } @@ -1702,9 +1702,9 @@ public LoadedCertificate(Azure.Core.ResourceIdentifier resourceId) { } public bool? LoadTrustStore { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } } - public partial class LogFileUriResponse + public partial class LogFileUriResult { - internal LogFileUriResponse() { } + internal LogFileUriResult() { } public System.Uri Uri { get { throw null; } } } public partial class MonitoringSettingProperties @@ -1713,7 +1713,7 @@ public MonitoringSettingProperties() { } public string AppInsightsAgentVersionsJava { get { throw null; } } public string AppInsightsInstrumentationKey { get { throw null; } set { } } public double? AppInsightsSamplingRate { get { throw null; } set { } } - public Azure.ResourceManager.AppPlatform.Models.Error Error { get { throw null; } set { } } + public Azure.ResourceManager.AppPlatform.Models.AppPlatformErrorInfo Error { get { throw null; } set { } } public Azure.ResourceManager.AppPlatform.Models.MonitoringSettingState? ProvisioningState { get { throw null; } } public bool? TraceEnabled { get { throw null; } set { } } } @@ -1895,9 +1895,9 @@ internal ResourceSkuZoneDetails() { } public System.Collections.Generic.IReadOnlyList Capabilities { get { throw null; } } public System.Collections.Generic.IReadOnlyList Name { get { throw null; } } } - public partial class ResourceUploadDefinition + public partial class ResourceUploadResult { - internal ResourceUploadDefinition() { } + internal ResourceUploadResult() { } public string RelativePath { get { throw null; } } public System.Uri UploadUri { get { throw null; } } } @@ -2019,7 +2019,7 @@ public StorageProperties() { } private readonly int _dummyPrimitive; public SupportedRuntimePlatform(string value) { throw null; } public static Azure.ResourceManager.AppPlatform.Models.SupportedRuntimePlatform Java { get { throw null; } } - public static Azure.ResourceManager.AppPlatform.Models.SupportedRuntimePlatform NETCore { get { throw null; } } + public static Azure.ResourceManager.AppPlatform.Models.SupportedRuntimePlatform NetCore { get { throw null; } } public bool Equals(Azure.ResourceManager.AppPlatform.Models.SupportedRuntimePlatform other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceResource.cs index cd15ad6c03204..8588a2baa5a1b 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppBuildServiceResource.cs @@ -326,7 +326,7 @@ public virtual Response Get(CancellationToken cancellat /// Operation Id: BuildService_GetResourceUploadUrl /// /// The cancellation token to use. - public virtual async Task> GetResourceUploadUriAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetResourceUploadUriAsync(CancellationToken cancellationToken = default) { using var scope = _appBuildServiceBuildServiceClientDiagnostics.CreateScope("AppBuildServiceResource.GetResourceUploadUri"); scope.Start(); @@ -348,7 +348,7 @@ public virtual async Task> GetResourceUploadU /// Operation Id: BuildService_GetResourceUploadUrl /// /// The cancellation token to use. - public virtual Response GetResourceUploadUri(CancellationToken cancellationToken = default) + public virtual Response GetResourceUploadUri(CancellationToken cancellationToken = default) { using var scope = _appBuildServiceBuildServiceClientDiagnostics.CreateScope("AppBuildServiceResource.GetResourceUploadUri"); scope.Start(); diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppDeploymentResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppDeploymentResource.cs index 8a4a48fc7ba6c..4f0db52c29a8f 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppDeploymentResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppDeploymentResource.cs @@ -409,7 +409,7 @@ public virtual ArmOperation Restart(WaitUntil waitUntil, CancellationToken cance /// Operation Id: Deployments_GetLogFileUrl /// /// The cancellation token to use. - public virtual async Task> GetLogFileUriAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetLogFileUriAsync(CancellationToken cancellationToken = default) { using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.GetLogFileUri"); scope.Start(); @@ -431,7 +431,7 @@ public virtual async Task> GetLogFileUriAsync(Cance /// Operation Id: Deployments_GetLogFileUrl /// /// The cancellation token to use. - public virtual Response GetLogFileUri(CancellationToken cancellationToken = default) + public virtual Response GetLogFileUri(CancellationToken cancellationToken = default) { using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.GetLogFileUri"); scope.Start(); @@ -453,19 +453,19 @@ public virtual Response GetLogFileUri(CancellationToken canc /// Operation Id: Deployments_GenerateHeapDump /// /// 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 diagnostic operation. + /// Parameters for the diagnostic operation. /// The cancellation token to use. - /// is null. - public virtual async Task GenerateHeapDumpAsync(WaitUntil waitUntil, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task GenerateHeapDumpAsync(WaitUntil waitUntil, DiagnosticContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); + Argument.AssertNotNull(content, nameof(content)); using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.GenerateHeapDump"); scope.Start(); try { - var response = await _appDeploymentResourceDeploymentsRestClient.GenerateHeapDumpAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateGenerateHeapDumpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appDeploymentResourceDeploymentsRestClient.GenerateHeapDumpAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateGenerateHeapDumpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -483,19 +483,19 @@ public virtual async Task GenerateHeapDumpAsync(WaitUntil waitUnti /// Operation Id: Deployments_GenerateHeapDump /// /// 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 diagnostic operation. + /// Parameters for the diagnostic operation. /// The cancellation token to use. - /// is null. - public virtual ArmOperation GenerateHeapDump(WaitUntil waitUntil, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation GenerateHeapDump(WaitUntil waitUntil, DiagnosticContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); + Argument.AssertNotNull(content, nameof(content)); using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.GenerateHeapDump"); scope.Start(); try { - var response = _appDeploymentResourceDeploymentsRestClient.GenerateHeapDump(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken); - var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateGenerateHeapDumpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appDeploymentResourceDeploymentsRestClient.GenerateHeapDump(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateGenerateHeapDumpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -513,19 +513,19 @@ public virtual ArmOperation GenerateHeapDump(WaitUntil waitUntil, DiagnosticPara /// Operation Id: Deployments_GenerateThreadDump /// /// 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 diagnostic operation. + /// Parameters for the diagnostic operation. /// The cancellation token to use. - /// is null. - public virtual async Task GenerateThreadDumpAsync(WaitUntil waitUntil, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task GenerateThreadDumpAsync(WaitUntil waitUntil, DiagnosticContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); + Argument.AssertNotNull(content, nameof(content)); using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.GenerateThreadDump"); scope.Start(); try { - var response = await _appDeploymentResourceDeploymentsRestClient.GenerateThreadDumpAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateGenerateThreadDumpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appDeploymentResourceDeploymentsRestClient.GenerateThreadDumpAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateGenerateThreadDumpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -543,19 +543,19 @@ public virtual async Task GenerateThreadDumpAsync(WaitUntil waitUn /// Operation Id: Deployments_GenerateThreadDump /// /// 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 diagnostic operation. + /// Parameters for the diagnostic operation. /// The cancellation token to use. - /// is null. - public virtual ArmOperation GenerateThreadDump(WaitUntil waitUntil, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation GenerateThreadDump(WaitUntil waitUntil, DiagnosticContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); + Argument.AssertNotNull(content, nameof(content)); using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.GenerateThreadDump"); scope.Start(); try { - var response = _appDeploymentResourceDeploymentsRestClient.GenerateThreadDump(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken); - var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateGenerateThreadDumpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appDeploymentResourceDeploymentsRestClient.GenerateThreadDump(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateGenerateThreadDumpRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -573,19 +573,19 @@ public virtual ArmOperation GenerateThreadDump(WaitUntil waitUntil, DiagnosticPa /// Operation Id: Deployments_StartJFR /// /// 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 diagnostic operation. + /// Parameters for the diagnostic operation. /// The cancellation token to use. - /// is null. - public virtual async Task StartJfrAsync(WaitUntil waitUntil, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task StartJfrAsync(WaitUntil waitUntil, DiagnosticContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); + Argument.AssertNotNull(content, nameof(content)); using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.StartJfr"); scope.Start(); try { - var response = await _appDeploymentResourceDeploymentsRestClient.StartJfrAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken).ConfigureAwait(false); - var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateStartJfrRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _appDeploymentResourceDeploymentsRestClient.StartJfrAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateStartJfrRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -603,19 +603,19 @@ public virtual async Task StartJfrAsync(WaitUntil waitUntil, Diagn /// Operation Id: Deployments_StartJFR /// /// 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 diagnostic operation. + /// Parameters for the diagnostic operation. /// The cancellation token to use. - /// is null. - public virtual ArmOperation StartJfr(WaitUntil waitUntil, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation StartJfr(WaitUntil waitUntil, DiagnosticContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); + Argument.AssertNotNull(content, nameof(content)); using var scope = _appDeploymentResourceDeploymentsClientDiagnostics.CreateScope("AppDeploymentResource.StartJfr"); scope.Start(); try { - var response = _appDeploymentResourceDeploymentsRestClient.StartJfr(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters, cancellationToken); - var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateStartJfrRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticParameters).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _appDeploymentResourceDeploymentsRestClient.StartJfr(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new AppPlatformArmOperation(_appDeploymentResourceDeploymentsClientDiagnostics, Pipeline, _appDeploymentResourceDeploymentsRestClient.CreateStartJfrRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformAppResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformAppResource.cs index 21d0245d0170d..039bdd4ef9a27 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformAppResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformAppResource.cs @@ -366,7 +366,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// Operation Id: Apps_GetResourceUploadUrl /// /// The cancellation token to use. - public virtual async Task> GetResourceUploadUriAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetResourceUploadUriAsync(CancellationToken cancellationToken = default) { using var scope = _appPlatformAppResourceAppsClientDiagnostics.CreateScope("AppPlatformAppResource.GetResourceUploadUri"); scope.Start(); @@ -388,7 +388,7 @@ public virtual async Task> GetResourceUploadU /// Operation Id: Apps_GetResourceUploadUrl /// /// The cancellation token to use. - public virtual Response GetResourceUploadUri(CancellationToken cancellationToken = default) + public virtual Response GetResourceUploadUri(CancellationToken cancellationToken = default) { using var scope = _appPlatformAppResourceAppsClientDiagnostics.CreateScope("AppPlatformAppResource.GetResourceUploadUri"); scope.Start(); diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Error.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformErrorInfo.Serialization.cs similarity index 84% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Error.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformErrorInfo.Serialization.cs index e161709aa71c5..b0081d41c9726 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Error.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformErrorInfo.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.AppPlatform.Models { - public partial class Error : IUtf8JsonSerializable + public partial class AppPlatformErrorInfo : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -28,7 +28,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static Error DeserializeError(JsonElement element) + internal static AppPlatformErrorInfo DeserializeAppPlatformErrorInfo(JsonElement element) { Optional code = default; Optional message = default; @@ -45,7 +45,7 @@ internal static Error DeserializeError(JsonElement element) continue; } } - return new Error(code.Value, message.Value); + return new AppPlatformErrorInfo(code.Value, message.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Error.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformErrorInfo.cs similarity index 68% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Error.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformErrorInfo.cs index c43b12d62e790..1627714a2b50b 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/Error.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppPlatformErrorInfo.cs @@ -8,17 +8,17 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// The error code compose of code and message. - public partial class Error + public partial class AppPlatformErrorInfo { - /// Initializes a new instance of Error. - public Error() + /// Initializes a new instance of AppPlatformErrorInfo. + public AppPlatformErrorInfo() { } - /// Initializes a new instance of Error. + /// Initializes a new instance of AppPlatformErrorInfo. /// The code of error. /// The message of error. - internal Error(string code, string message) + internal AppPlatformErrorInfo(string code, string message) { Code = code; Message = message; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProperties.Serialization.cs index 3b6154cc40a62..6e6c4fe97094f 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProperties.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProperties.Serialization.cs @@ -101,7 +101,7 @@ internal static AppResourceProperties DeserializeAppResourceProperties(JsonEleme Optional httpsOnly = default; Optional temporaryDisk = default; Optional persistentDisk = default; - Optional> customPersistentDisks = default; + Optional> customPersistentDisks = default; Optional enableEndToEndTLS = default; Optional> loadedCertificates = default; foreach (var property in element.EnumerateObject()) @@ -198,10 +198,10 @@ internal static AppResourceProperties DeserializeAppResourceProperties(JsonEleme property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(CustomPersistentDiskResource.DeserializeCustomPersistentDiskResource(item)); + array.Add(CustomPersistentDiskData.DeserializeCustomPersistentDiskData(item)); } customPersistentDisks = array; continue; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProperties.cs index 08d6e2913b1cf..fead5cce6885b 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProperties.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/AppResourceProperties.cs @@ -18,7 +18,7 @@ public partial class AppResourceProperties public AppResourceProperties() { AddonConfigs = new ChangeTrackingDictionary>(); - CustomPersistentDisks = new ChangeTrackingList(); + CustomPersistentDisks = new ChangeTrackingList(); LoadedCertificates = new ChangeTrackingList(); } @@ -34,7 +34,7 @@ public AppResourceProperties() /// List of custom persistent disks. /// Indicate if end to end TLS is enabled. /// Collection of loaded certificates. - internal AppResourceProperties(bool? @public, Uri uri, IDictionary> addonConfigs, AppResourceProvisioningState? provisioningState, string fqdn, bool? httpsOnly, TemporaryDisk temporaryDisk, PersistentDisk persistentDisk, IList customPersistentDisks, bool? enableEndToEndTls, IList loadedCertificates) + internal AppResourceProperties(bool? @public, Uri uri, IDictionary> addonConfigs, AppResourceProvisioningState? provisioningState, string fqdn, bool? httpsOnly, TemporaryDisk temporaryDisk, PersistentDisk persistentDisk, IList customPersistentDisks, bool? enableEndToEndTls, IList loadedCertificates) { Public = @public; Uri = uri; @@ -66,7 +66,7 @@ internal AppResourceProperties(bool? @public, Uri uri, IDictionary Persistent disk settings. public PersistentDisk PersistentDisk { get; set; } /// List of custom persistent disks. - public IList CustomPersistentDisks { get; } + public IList CustomPersistentDisks { get; } /// Indicate if end to end TLS is enabled. public bool? EnableEndToEndTls { get; set; } /// Collection of loaded certificates. diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerProperties.Serialization.cs index d42fff7609fad..1a5ad85bf56db 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerProperties.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerProperties.Serialization.cs @@ -31,7 +31,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) internal static ConfigServerProperties DeserializeConfigServerProperties(JsonElement element) { Optional provisioningState = default; - Optional error = default; + Optional error = default; Optional configServer = default; foreach (var property in element.EnumerateObject()) { @@ -52,7 +52,7 @@ internal static ConfigServerProperties DeserializeConfigServerProperties(JsonEle property.ThrowNonNullablePropertyIsNull(); continue; } - error = Error.DeserializeError(property.Value); + error = AppPlatformErrorInfo.DeserializeAppPlatformErrorInfo(property.Value); continue; } if (property.NameEquals("configServer")) diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerProperties.cs index 9af8704a88fe0..7bd04733a4a97 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerProperties.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ConfigServerProperties.cs @@ -19,7 +19,7 @@ public ConfigServerProperties() /// State of the config server. /// Error when apply config server settings. /// Settings of config server. - internal ConfigServerProperties(ConfigServerState? provisioningState, Error error, ConfigServerSettings configServer) + internal ConfigServerProperties(ConfigServerState? provisioningState, AppPlatformErrorInfo error, ConfigServerSettings configServer) { ProvisioningState = provisioningState; Error = error; @@ -29,7 +29,7 @@ internal ConfigServerProperties(ConfigServerState? provisioningState, Error erro /// State of the config server. public ConfigServerState? ProvisioningState { get; } /// Error when apply config server settings. - public Error Error { get; set; } + public AppPlatformErrorInfo Error { get; set; } /// Settings of config server. internal ConfigServerSettings ConfigServer { get; set; } /// Property of git environment. diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskData.Serialization.cs similarity index 85% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskResource.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskData.Serialization.cs index df17597312176..6153a32ad6ac0 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskResource.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskData.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.AppPlatform.Models { - public partial class CustomPersistentDiskResource : IUtf8JsonSerializable + public partial class CustomPersistentDiskData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -25,7 +25,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static CustomPersistentDiskResource DeserializeCustomPersistentDiskResource(JsonElement element) + internal static CustomPersistentDiskData DeserializeCustomPersistentDiskData(JsonElement element) { Optional customPersistentDiskProperties = default; string storageId = default; @@ -47,7 +47,7 @@ internal static CustomPersistentDiskResource DeserializeCustomPersistentDiskReso continue; } } - return new CustomPersistentDiskResource(customPersistentDiskProperties.Value, storageId); + return new CustomPersistentDiskData(customPersistentDiskProperties.Value, storageId); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskResource.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskData.cs similarity index 83% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskResource.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskData.cs index 1dfb1490d4a91..185e531460fc9 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskResource.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/CustomPersistentDiskData.cs @@ -10,12 +10,12 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Custom persistent disk resource payload. - public partial class CustomPersistentDiskResource + public partial class CustomPersistentDiskData { - /// Initializes a new instance of CustomPersistentDiskResource. + /// Initializes a new instance of CustomPersistentDiskData. /// The resource id of Azure Spring Cloud Storage resource. /// is null. - public CustomPersistentDiskResource(string storageId) + public CustomPersistentDiskData(string storageId) { if (storageId == null) { @@ -25,10 +25,10 @@ public CustomPersistentDiskResource(string storageId) StorageId = storageId; } - /// Initializes a new instance of CustomPersistentDiskResource. + /// Initializes a new instance of CustomPersistentDiskData. /// Properties of the custom persistent disk resource payload. /// The resource id of Azure Spring Cloud Storage resource. - internal CustomPersistentDiskResource(CustomPersistentDiskProperties customPersistentDiskProperties, string storageId) + internal CustomPersistentDiskData(CustomPersistentDiskProperties customPersistentDiskProperties, string storageId) { CustomPersistentDiskProperties = customPersistentDiskProperties; StorageId = storageId; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DiagnosticParameters.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DiagnosticContent.Serialization.cs similarity index 93% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DiagnosticParameters.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DiagnosticContent.Serialization.cs index 0b88cdfdd92e6..7ef523183faef 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DiagnosticParameters.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DiagnosticContent.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.AppPlatform.Models { - public partial class DiagnosticParameters : IUtf8JsonSerializable + public partial class DiagnosticContent : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DiagnosticParameters.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DiagnosticContent.cs similarity index 79% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DiagnosticParameters.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DiagnosticContent.cs index 452281322d52a..6f70435ad53fc 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DiagnosticParameters.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/DiagnosticContent.cs @@ -8,10 +8,10 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Diagnostic parameters of diagnostic operations. - public partial class DiagnosticParameters + public partial class DiagnosticContent { - /// Initializes a new instance of DiagnosticParameters. - public DiagnosticParameters() + /// Initializes a new instance of DiagnosticContent. + public DiagnosticContent() { } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUriResponse.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUriResult.Serialization.cs similarity index 75% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUriResponse.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUriResult.Serialization.cs index b124afc943cef..71e125093aa6b 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUriResponse.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUriResult.Serialization.cs @@ -11,9 +11,9 @@ namespace Azure.ResourceManager.AppPlatform.Models { - public partial class LogFileUriResponse + public partial class LogFileUriResult { - internal static LogFileUriResponse DeserializeLogFileUriResponse(JsonElement element) + internal static LogFileUriResult DeserializeLogFileUriResult(JsonElement element) { Uri url = default; foreach (var property in element.EnumerateObject()) @@ -24,7 +24,7 @@ internal static LogFileUriResponse DeserializeLogFileUriResponse(JsonElement ele continue; } } - return new LogFileUriResponse(url); + return new LogFileUriResult(url); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUriResponse.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUriResult.cs similarity index 87% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUriResponse.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUriResult.cs index de161ffd077e7..210cb4db69b41 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUriResponse.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/LogFileUriResult.cs @@ -10,12 +10,12 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Log file URL payload. - public partial class LogFileUriResponse + public partial class LogFileUriResult { - /// Initializes a new instance of LogFileUriResponse. + /// Initializes a new instance of LogFileUriResult. /// URL of the log file. /// is null. - internal LogFileUriResponse(Uri uri) + internal LogFileUriResult(Uri uri) { if (uri == null) { diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MonitoringSettingProperties.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MonitoringSettingProperties.Serialization.cs index 7ca388a924b3c..3c806cb8a40df 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MonitoringSettingProperties.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MonitoringSettingProperties.Serialization.cs @@ -46,7 +46,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) internal static MonitoringSettingProperties DeserializeMonitoringSettingProperties(JsonElement element) { Optional provisioningState = default; - Optional error = default; + Optional error = default; Optional traceEnabled = default; Optional appInsightsInstrumentationKey = default; Optional appInsightsSamplingRate = default; @@ -70,7 +70,7 @@ internal static MonitoringSettingProperties DeserializeMonitoringSettingProperti property.ThrowNonNullablePropertyIsNull(); continue; } - error = Error.DeserializeError(property.Value); + error = AppPlatformErrorInfo.DeserializeAppPlatformErrorInfo(property.Value); continue; } if (property.NameEquals("traceEnabled")) diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MonitoringSettingProperties.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MonitoringSettingProperties.cs index d8c9b9e832d93..56d408d812764 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MonitoringSettingProperties.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/MonitoringSettingProperties.cs @@ -22,7 +22,7 @@ public MonitoringSettingProperties() /// Target application insight instrumentation key, null or whitespace include empty will disable monitoringSettings. /// Indicates the sampling rate of application insight agent, should be in range [0.0, 100.0]. /// Indicates the versions of application insight agent. - internal MonitoringSettingProperties(MonitoringSettingState? provisioningState, Error error, bool? traceEnabled, string appInsightsInstrumentationKey, double? appInsightsSamplingRate, ApplicationInsightsAgentVersions appInsightsAgentVersions) + internal MonitoringSettingProperties(MonitoringSettingState? provisioningState, AppPlatformErrorInfo error, bool? traceEnabled, string appInsightsInstrumentationKey, double? appInsightsSamplingRate, ApplicationInsightsAgentVersions appInsightsAgentVersions) { ProvisioningState = provisioningState; Error = error; @@ -35,7 +35,7 @@ internal MonitoringSettingProperties(MonitoringSettingState? provisioningState, /// State of the Monitoring Setting. public MonitoringSettingState? ProvisioningState { get; } /// Error when apply Monitoring Setting changes. - public Error Error { get; set; } + public AppPlatformErrorInfo Error { get; set; } /// Indicates whether enable the trace functionality, which will be deprecated since api version 2020-11-01-preview. Please leverage appInsightsInstrumentationKey to indicate if monitoringSettings enabled or not. public bool? TraceEnabled { get; set; } /// Target application insight instrumentation key, null or whitespace include empty will disable monitoringSettings. diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceUploadDefinition.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceUploadResult.Serialization.cs similarity index 81% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceUploadDefinition.Serialization.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceUploadResult.Serialization.cs index 4ba43a3934891..322d67f4fdb9e 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceUploadDefinition.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceUploadResult.Serialization.cs @@ -11,9 +11,9 @@ namespace Azure.ResourceManager.AppPlatform.Models { - public partial class ResourceUploadDefinition + public partial class ResourceUploadResult { - internal static ResourceUploadDefinition DeserializeResourceUploadDefinition(JsonElement element) + internal static ResourceUploadResult DeserializeResourceUploadResult(JsonElement element) { Optional relativePath = default; Optional uploadUrl = default; @@ -35,7 +35,7 @@ internal static ResourceUploadDefinition DeserializeResourceUploadDefinition(Jso continue; } } - return new ResourceUploadDefinition(relativePath.Value, uploadUrl.Value); + return new ResourceUploadResult(relativePath.Value, uploadUrl.Value); } } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceUploadDefinition.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceUploadResult.cs similarity index 79% rename from sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceUploadDefinition.cs rename to sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceUploadResult.cs index 25739d6c3ada7..a093c6937f854 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceUploadDefinition.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/ResourceUploadResult.cs @@ -10,17 +10,17 @@ namespace Azure.ResourceManager.AppPlatform.Models { /// Resource upload definition payload. - public partial class ResourceUploadDefinition + public partial class ResourceUploadResult { - /// Initializes a new instance of ResourceUploadDefinition. - internal ResourceUploadDefinition() + /// Initializes a new instance of ResourceUploadResult. + internal ResourceUploadResult() { } - /// Initializes a new instance of ResourceUploadDefinition. + /// Initializes a new instance of ResourceUploadResult. /// Source relative path. /// Upload URL. - internal ResourceUploadDefinition(string relativePath, Uri uploadUri) + internal ResourceUploadResult(string relativePath, Uri uploadUri) { RelativePath = relativePath; UploadUri = uploadUri; diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedRuntimePlatform.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedRuntimePlatform.cs index 624639f35b70d..029577021d9ac 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedRuntimePlatform.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/Models/SupportedRuntimePlatform.cs @@ -23,12 +23,12 @@ public SupportedRuntimePlatform(string value) } private const string JavaValue = "Java"; - private const string NETCoreValue = ".NET Core"; + private const string NetCoreValue = ".NET Core"; /// Java. public static SupportedRuntimePlatform Java { get; } = new SupportedRuntimePlatform(JavaValue); /// .NET Core. - public static SupportedRuntimePlatform NETCore { get; } = new SupportedRuntimePlatform(NETCoreValue); + public static SupportedRuntimePlatform NetCore { get; } = new SupportedRuntimePlatform(NetCoreValue); /// Determines if two values are the same. public static bool operator ==(SupportedRuntimePlatform left, SupportedRuntimePlatform right) => left.Equals(right); /// Determines if two values are not the same. 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 3f7b7740f04ae..97c712720b1d6 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/AppsRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/AppsRestOperations.cs @@ -489,7 +489,7 @@ internal HttpMessage CreateGetResourceUploadUriRequest(string subscriptionId, st /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetResourceUploadUriAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, CancellationToken cancellationToken = default) + public async Task> GetResourceUploadUriAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -502,9 +502,9 @@ public async Task> GetResourceUploadUriAsync( { case 200: { - ResourceUploadDefinition value = default; + ResourceUploadResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ResourceUploadDefinition.DeserializeResourceUploadDefinition(document.RootElement); + value = ResourceUploadResult.DeserializeResourceUploadResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -520,7 +520,7 @@ public async Task> GetResourceUploadUriAsync( /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response GetResourceUploadUri(string subscriptionId, string resourceGroupName, string serviceName, string appName, CancellationToken cancellationToken = default) + public Response GetResourceUploadUri(string subscriptionId, string resourceGroupName, string serviceName, string appName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -533,9 +533,9 @@ public Response GetResourceUploadUri(string subscripti { case 200: { - ResourceUploadDefinition value = default; + ResourceUploadResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ResourceUploadDefinition.DeserializeResourceUploadDefinition(document.RootElement); + value = ResourceUploadResult.DeserializeResourceUploadResult(document.RootElement); return Response.FromValue(value, message.Response); } default: 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 88d747514ab99..1e0282184cacb 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/BuildServiceRestOperations.cs @@ -802,7 +802,7 @@ internal HttpMessage CreateGetResourceUploadUriRequest(string subscriptionId, st /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetResourceUploadUriAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) + public async Task> GetResourceUploadUriAsync(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -815,9 +815,9 @@ public async Task> GetResourceUploadUriAsync( { case 200: { - ResourceUploadDefinition value = default; + ResourceUploadResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ResourceUploadDefinition.DeserializeResourceUploadDefinition(document.RootElement); + value = ResourceUploadResult.DeserializeResourceUploadResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -833,7 +833,7 @@ public async Task> GetResourceUploadUriAsync( /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response GetResourceUploadUri(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) + public Response GetResourceUploadUri(string subscriptionId, string resourceGroupName, string serviceName, string buildServiceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -846,9 +846,9 @@ public Response GetResourceUploadUri(string subscripti { case 200: { - ResourceUploadDefinition value = default; + ResourceUploadResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ResourceUploadDefinition.DeserializeResourceUploadDefinition(document.RootElement); + value = ResourceUploadResult.DeserializeResourceUploadResult(document.RootElement); return Response.FromValue(value, message.Response); } default: 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 2fb7e2780fb5c..437a2e76bb635 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/DeploymentsRestOperations.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/RestOperations/DeploymentsRestOperations.cs @@ -863,7 +863,7 @@ internal HttpMessage CreateGetLogFileUriRequest(string subscriptionId, string re /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetLogFileUriAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, CancellationToken cancellationToken = default) + public async Task> GetLogFileUriAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -877,13 +877,13 @@ public async Task> GetLogFileUriAsync(string subscr { case 200: { - LogFileUriResponse value = default; + LogFileUriResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = LogFileUriResponse.DeserializeLogFileUriResponse(document.RootElement); + value = LogFileUriResult.DeserializeLogFileUriResult(document.RootElement); return Response.FromValue(value, message.Response); } case 204: - return Response.FromValue((LogFileUriResponse)null, message.Response); + return Response.FromValue((LogFileUriResult)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -898,7 +898,7 @@ public async Task> GetLogFileUriAsync(string subscr /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public Response GetLogFileUri(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, CancellationToken cancellationToken = default) + public Response GetLogFileUri(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -912,19 +912,19 @@ public Response GetLogFileUri(string subscriptionId, string { case 200: { - LogFileUriResponse value = default; + LogFileUriResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = LogFileUriResponse.DeserializeLogFileUriResponse(document.RootElement); + value = LogFileUriResult.DeserializeLogFileUriResult(document.RootElement); return Response.FromValue(value, message.Response); } case 204: - return Response.FromValue((LogFileUriResponse)null, message.Response); + return Response.FromValue((LogFileUriResult)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateGenerateHeapDumpRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticParameters diagnosticParameters) + internal HttpMessage CreateGenerateHeapDumpRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -946,9 +946,9 @@ internal HttpMessage CreateGenerateHeapDumpRequest(string subscriptionId, string request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(diagnosticParameters); - request.Content = content; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; _userAgent.Apply(message); return message; } @@ -959,20 +959,20 @@ internal HttpMessage CreateGenerateHeapDumpRequest(string subscriptionId, string /// The name of the Service resource. /// The name of the App resource. /// The name of the Deployment resource. - /// Parameters for the diagnostic operation. + /// Parameters for the diagnostic operation. /// The cancellation token to use. - /// , , , , or is null. + /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public async Task GenerateHeapDumpAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + public async Task GenerateHeapDumpAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); Argument.AssertNotNullOrEmpty(appName, nameof(appName)); Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateGenerateHeapDumpRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters); + using var message = CreateGenerateHeapDumpRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -990,20 +990,20 @@ public async Task GenerateHeapDumpAsync(string subscriptionId, string /// The name of the Service resource. /// The name of the App resource. /// The name of the Deployment resource. - /// Parameters for the diagnostic operation. + /// Parameters for the diagnostic operation. /// The cancellation token to use. - /// , , , , or is null. + /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public Response GenerateHeapDump(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + public Response GenerateHeapDump(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); Argument.AssertNotNullOrEmpty(appName, nameof(appName)); Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateGenerateHeapDumpRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters); + using var message = CreateGenerateHeapDumpRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -1015,7 +1015,7 @@ public Response GenerateHeapDump(string subscriptionId, string resourceGroupName } } - internal HttpMessage CreateGenerateThreadDumpRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticParameters diagnosticParameters) + internal HttpMessage CreateGenerateThreadDumpRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1037,9 +1037,9 @@ internal HttpMessage CreateGenerateThreadDumpRequest(string subscriptionId, stri request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(diagnosticParameters); - request.Content = content; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; _userAgent.Apply(message); return message; } @@ -1050,20 +1050,20 @@ internal HttpMessage CreateGenerateThreadDumpRequest(string subscriptionId, stri /// The name of the Service resource. /// The name of the App resource. /// The name of the Deployment resource. - /// Parameters for the diagnostic operation. + /// Parameters for the diagnostic operation. /// The cancellation token to use. - /// , , , , or is null. + /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public async Task GenerateThreadDumpAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + public async Task GenerateThreadDumpAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); Argument.AssertNotNullOrEmpty(appName, nameof(appName)); Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateGenerateThreadDumpRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters); + using var message = CreateGenerateThreadDumpRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -1081,20 +1081,20 @@ public async Task GenerateThreadDumpAsync(string subscriptionId, strin /// The name of the Service resource. /// The name of the App resource. /// The name of the Deployment resource. - /// Parameters for the diagnostic operation. + /// Parameters for the diagnostic operation. /// The cancellation token to use. - /// , , , , or is null. + /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public Response GenerateThreadDump(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + public Response GenerateThreadDump(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); Argument.AssertNotNullOrEmpty(appName, nameof(appName)); Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateGenerateThreadDumpRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters); + using var message = CreateGenerateThreadDumpRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -1106,7 +1106,7 @@ public Response GenerateThreadDump(string subscriptionId, string resourceGroupNa } } - internal HttpMessage CreateStartJfrRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticParameters diagnosticParameters) + internal HttpMessage CreateStartJfrRequest(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1128,9 +1128,9 @@ internal HttpMessage CreateStartJfrRequest(string subscriptionId, string resourc request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(diagnosticParameters); - request.Content = content; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; _userAgent.Apply(message); return message; } @@ -1141,20 +1141,20 @@ internal HttpMessage CreateStartJfrRequest(string subscriptionId, string resourc /// The name of the Service resource. /// The name of the App resource. /// The name of the Deployment resource. - /// Parameters for the diagnostic operation. + /// Parameters for the diagnostic operation. /// The cancellation token to use. - /// , , , , or is null. + /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public async Task StartJfrAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + public async Task StartJfrAsync(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); Argument.AssertNotNullOrEmpty(appName, nameof(appName)); Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateStartJfrRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters); + using var message = CreateStartJfrRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -1172,20 +1172,20 @@ public async Task StartJfrAsync(string subscriptionId, string resource /// The name of the Service resource. /// The name of the App resource. /// The name of the Deployment resource. - /// Parameters for the diagnostic operation. + /// Parameters for the diagnostic operation. /// The cancellation token to use. - /// , , , , or is null. + /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public Response StartJfr(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticParameters diagnosticParameters, CancellationToken cancellationToken = default) + public Response StartJfr(string subscriptionId, string resourceGroupName, string serviceName, string appName, string deploymentName, DiagnosticContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); Argument.AssertNotNullOrEmpty(appName, nameof(appName)); Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - Argument.AssertNotNull(diagnosticParameters, nameof(diagnosticParameters)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateStartJfrRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters); + using var message = CreateStartJfrRequest(subscriptionId, resourceGroupName, serviceName, appName, deploymentName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md index 6887205b0f235..cddf0427301de 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/autorest.md @@ -38,6 +38,7 @@ rename-rules: JFR: Jfr TLS: Tls APM: Apm + NETCore: NetCore Url: Uri Urls: Uris override-operation-name: @@ -109,4 +110,9 @@ directive: $.CustomDomainResource['x-ms-client-name'] = 'AppPlatformCustomDomainResource'; $.ServiceResource['x-ms-client-name'] = 'AppPlatformServiceResource'; $.AppResource['x-ms-client-name'] = 'AppPlatformAppResource'; + $.ResourceUploadDefinition['x-ms-client-name'] = 'ResourceUploadResult'; + $.DiagnosticParameters['x-ms-client-name'] = 'DiagnosticContent'; + $.LogFileUrlResponse['x-ms-client-name'] = 'LogFileUriResult'; + $.CustomPersistentDiskResource['x-ms-client-name'] = 'CustomPersistentDiskData'; + $.Error['x-ms-client-name'] = 'AppPlatformErrorInfo'; ``` \ No newline at end of file